diff options
Diffstat (limited to 'js/public/ProfilingFrameIterator.h')
-rw-r--r-- | js/public/ProfilingFrameIterator.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/js/public/ProfilingFrameIterator.h b/js/public/ProfilingFrameIterator.h index 886ed806e9..bbad2b1244 100644 --- a/js/public/ProfilingFrameIterator.h +++ b/js/public/ProfilingFrameIterator.h @@ -14,6 +14,7 @@ #include "jstypes.h" #include "js/GCAnnotations.h" +#include "js/ProfilingCategory.h" #include "js/TypeDecls.h" namespace js { @@ -141,7 +142,9 @@ class MOZ_NON_PARAM JS_PUBLIC_API ProfilingFrameIterator { Frame_BaselineInterpreter, Frame_Baseline, Frame_Ion, - Frame_Wasm + Frame_WasmBaseline, + Frame_WasmIon, + Frame_WasmOther, }; struct Frame { @@ -166,6 +169,23 @@ class MOZ_NON_PARAM JS_PUBLIC_API ProfilingFrameIterator { MOZ_ASSERT(kind == Frame_BaselineInterpreter); return interpreterPC_; } + ProfilingCategoryPair profilingCategory() const { + switch (kind) { + case FrameKind::Frame_BaselineInterpreter: + return JS::ProfilingCategoryPair::JS_BaselineInterpret; + case FrameKind::Frame_Baseline: + return JS::ProfilingCategoryPair::JS_Baseline; + case FrameKind::Frame_Ion: + return JS::ProfilingCategoryPair::JS_IonMonkey; + case FrameKind::Frame_WasmBaseline: + return JS::ProfilingCategoryPair::JS_WasmBaseline; + case FrameKind::Frame_WasmIon: + return JS::ProfilingCategoryPair::JS_WasmIon; + case FrameKind::Frame_WasmOther: + return JS::ProfilingCategoryPair::JS_WasmOther; + } + MOZ_CRASH(); + } } JS_HAZ_GC_INVALIDATED; bool isWasm() const; |