michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- michael@0: * vim: set ts=8 sts=4 et sw=4 tw=99: michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef jit_IonInstrumentatjit_h michael@0: #define jit_IonInstrumentatjit_h michael@0: michael@0: namespace js { michael@0: michael@0: class SPSProfiler; michael@0: michael@0: namespace jit { michael@0: michael@0: class MacroAssembler; michael@0: michael@0: typedef SPSInstrumentation BaseInstrumentation; michael@0: michael@0: class IonInstrumentation : public BaseInstrumentation michael@0: { michael@0: jsbytecode **trackedPc_; michael@0: michael@0: public: michael@0: IonInstrumentation(SPSProfiler *profiler, jsbytecode **pc) michael@0: : BaseInstrumentation(profiler), michael@0: trackedPc_(pc) michael@0: { michael@0: JS_ASSERT(pc != nullptr); michael@0: } michael@0: michael@0: void leave(MacroAssembler &masm, Register reg, bool inlinedFunction = false) { michael@0: BaseInstrumentation::leave(*trackedPc_, masm, reg, inlinedFunction); michael@0: } michael@0: michael@0: bool enterInlineFrame() { michael@0: return BaseInstrumentation::enterInlineFrame(*trackedPc_); michael@0: } michael@0: }; michael@0: michael@0: } // namespace jit michael@0: } // namespace js michael@0: michael@0: #endif /* jit_IonInstrumentatjit_h */