Bug 1322443 - TraceLogging: Report irregexp execution in Ion, r=bbouvier

This commit is contained in:
Hannes Verschore 2016-12-08 13:56:11 -10:00
Родитель 5539b06fb0
Коммит 36a4f8a9a7
1 изменённых файлов: 17 добавлений и 0 удалений

Просмотреть файл

@ -1179,6 +1179,16 @@ PrepareAndExecuteRegExp(JSContext* cx, MacroAssembler& masm, Register regexp, Re
if (regexp.volatile_())
volatileRegs.add(regexp);
#ifdef JS_TRACE_LOGGING
TraceLoggerThread* logger = TraceLoggerForMainThread(cx->runtime());
if (TraceLogTextIdEnabled(TraceLogger_IrregexpExecute)) {
masm.push(temp1);
masm.movePtr(ImmPtr(logger), temp1);
masm.tracelogStartId(temp1, TraceLogger_IrregexpExecute);
masm.pop(temp1);
}
#endif
// Execute the RegExp.
masm.computeEffectiveAddress(Address(masm.getStackPointer(), inputOutputDataStartOffset), temp2);
masm.PushRegsInMask(volatileRegs);
@ -1187,6 +1197,13 @@ PrepareAndExecuteRegExp(JSContext* cx, MacroAssembler& masm, Register regexp, Re
masm.callWithABI(codePointer);
masm.PopRegsInMask(volatileRegs);
#ifdef JS_TRACE_LOGGING
if (TraceLogTextIdEnabled(TraceLogger_IrregexpExecute)) {
masm.movePtr(ImmPtr(logger), temp1);
masm.tracelogStopId(temp1, TraceLogger_IrregexpExecute);
}
#endif
Label success;
masm.branch32(Assembler::Equal, matchResultAddress,
Imm32(RegExpRunStatus_Success_NotFound), notFound);