1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- 2 * vim: set ts=8 sts=2 et sw=2 tw=80: 3 * This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 #ifndef js_TelemetryTimers_h 8 #define js_TelemetryTimers_h 9 10 #include "mozilla/TimeStamp.h" 11 12 #include "jstypes.h" 13 14 struct JS_PUBLIC_API JSContext; 15 16 namespace JS { 17 18 /** Timing information for telemetry purposes **/ 19 struct JSTimers { 20 mozilla::TimeDuration executionTime; // Total time spent executing 21 mozilla::TimeDuration delazificationTime; // Total time spent delazifying 22 mozilla::TimeDuration xdrEncodingTime; // Total time spent XDR encoding 23 mozilla::TimeDuration gcTime; // Total time spent in GC 24 mozilla::TimeDuration 25 protectTime; // Total time spent protecting JIT executable memory 26 mozilla::TimeDuration 27 baselineCompileTime; // Total time spent in baseline compiler 28 }; 29 30 extern JS_PUBLIC_API JSTimers GetJSTimers(JSContext* cx); 31 32 } // namespace JS 33 34 #endif // js_TelemetryTimers_h 35