Bug 1060283 part 1 - Rename IonSpew to JitSpew. r=h4writer

--HG--
rename : js/src/jit/IonSpewer.cpp => js/src/jit/JitSpewer.cpp
rename : js/src/jit/IonSpewer.h => js/src/jit/JitSpewer.h
extra : rebase_source : 87ff9b0726ece57555e896a15ed7268a3f1d69e6
This commit is contained in:
Jan de Mooij 2014-09-02 21:24:26 +02:00
parent 85d03dd759
commit d1eae77938
48 changed files with 786 additions and 786 deletions

View File

@ -6588,7 +6588,7 @@ CheckFunctionsParallel(ModuleCompiler &m)
if (!ParallelCompilationEnabled(m.cx()) || !g.claim())
return CheckFunctionsSequential(m);
IonSpew(IonSpew_Logs, "Can't log asm.js script. (Compiled on background thread.)");
JitSpew(JitSpew_Logs, "Can't log asm.js script. (Compiled on background thread.)");
// Saturate all helper threads.
size_t numParallelJobs = HelperThreadState().maxAsmJSCompilationThreads();

View File

@ -78,7 +78,7 @@ NativeRegExpMacroAssembler::NativeRegExpMacroAssembler(LifoAlloc *alloc, RegExpS
temp1 = regs.takeAny();
temp2 = regs.takeAny();
IonSpew(IonSpew_Codegen,
JitSpew(JitSpew_Codegen,
"Starting RegExp (input_end_pointer %s) (current_character %s)"
" (current_position %s) (backtrack_stack_pointer %s) (temp0 %s) temp1 (%s) temp2 (%s)",
input_end_pointer.name(),
@ -107,7 +107,7 @@ NativeRegExpMacroAssembler::NativeRegExpMacroAssembler(LifoAlloc *alloc, RegExpS
masm.bind(&start_label_);
}
#define SPEW_PREFIX IonSpew_Codegen, "!!! "
#define SPEW_PREFIX JitSpew_Codegen, "!!! "
// The signature of the code which this generates is:
//
@ -118,7 +118,7 @@ NativeRegExpMacroAssembler::GenerateCode(JSContext *cx)
if (!cx->compartment()->ensureJitCompartmentExists(cx))
return RegExpCode();
IonSpew(SPEW_PREFIX "GenerateCode");
JitSpew(SPEW_PREFIX "GenerateCode");
// We need an even number of registers, for stack alignment.
if (num_registers_ % 2 == 1)
@ -460,7 +460,7 @@ NativeRegExpMacroAssembler::GenerateCode(JSContext *cx)
ImmPtr(0));
}
IonSpew(IonSpew_Codegen, "Created RegExp (raw %p length %d)",
JitSpew(JitSpew_Codegen, "Created RegExp (raw %p length %d)",
(void *) code->raw(), (int) masm.bytesNeeded());
RegExpCode res;
@ -477,7 +477,7 @@ NativeRegExpMacroAssembler::stack_limit_slack()
void
NativeRegExpMacroAssembler::AdvanceCurrentPosition(int by)
{
IonSpew(SPEW_PREFIX "AdvanceCurrentPosition(%d)", by);
JitSpew(SPEW_PREFIX "AdvanceCurrentPosition(%d)", by);
if (by != 0)
masm.addPtr(Imm32(by * char_size()), current_position);
@ -486,7 +486,7 @@ NativeRegExpMacroAssembler::AdvanceCurrentPosition(int by)
void
NativeRegExpMacroAssembler::AdvanceRegister(int reg, int by)
{
IonSpew(SPEW_PREFIX "AdvanceRegister(%d, %d)", reg, by);
JitSpew(SPEW_PREFIX "AdvanceRegister(%d, %d)", reg, by);
JS_ASSERT(reg >= 0);
JS_ASSERT(reg < num_registers_);
@ -497,7 +497,7 @@ NativeRegExpMacroAssembler::AdvanceRegister(int reg, int by)
void
NativeRegExpMacroAssembler::Backtrack()
{
IonSpew(SPEW_PREFIX "Backtrack");
JitSpew(SPEW_PREFIX "Backtrack");
// Check for an interrupt.
Label noInterrupt;
@ -516,7 +516,7 @@ NativeRegExpMacroAssembler::Backtrack()
void
NativeRegExpMacroAssembler::Bind(Label *label)
{
IonSpew(SPEW_PREFIX "Bind");
JitSpew(SPEW_PREFIX "Bind");
masm.bind(label);
}
@ -524,7 +524,7 @@ NativeRegExpMacroAssembler::Bind(Label *label)
void
NativeRegExpMacroAssembler::CheckAtStart(Label* on_at_start)
{
IonSpew(SPEW_PREFIX "CheckAtStart");
JitSpew(SPEW_PREFIX "CheckAtStart");
Label not_at_start;
@ -544,7 +544,7 @@ NativeRegExpMacroAssembler::CheckAtStart(Label* on_at_start)
void
NativeRegExpMacroAssembler::CheckNotAtStart(Label* on_not_at_start)
{
IonSpew(SPEW_PREFIX "CheckNotAtStart");
JitSpew(SPEW_PREFIX "CheckNotAtStart");
// Did we start the match at the start of the string at all?
Address startIndex(StackPointer, offsetof(FrameData, startIndex));
@ -560,14 +560,14 @@ NativeRegExpMacroAssembler::CheckNotAtStart(Label* on_not_at_start)
void
NativeRegExpMacroAssembler::CheckCharacter(unsigned c, Label* on_equal)
{
IonSpew(SPEW_PREFIX "CheckCharacter(%d)", (int) c);
JitSpew(SPEW_PREFIX "CheckCharacter(%d)", (int) c);
masm.branch32(Assembler::Equal, current_character, Imm32(c), BranchOrBacktrack(on_equal));
}
void
NativeRegExpMacroAssembler::CheckNotCharacter(unsigned c, Label* on_not_equal)
{
IonSpew(SPEW_PREFIX "CheckNotCharacter(%d)", (int) c);
JitSpew(SPEW_PREFIX "CheckNotCharacter(%d)", (int) c);
masm.branch32(Assembler::NotEqual, current_character, Imm32(c), BranchOrBacktrack(on_not_equal));
}
@ -575,7 +575,7 @@ void
NativeRegExpMacroAssembler::CheckCharacterAfterAnd(unsigned c, unsigned and_with,
Label *on_equal)
{
IonSpew(SPEW_PREFIX "CheckCharacterAfterAnd(%d, %d)", (int) c, (int) and_with);
JitSpew(SPEW_PREFIX "CheckCharacterAfterAnd(%d, %d)", (int) c, (int) and_with);
if (c == 0) {
masm.branchTest32(Assembler::Zero, current_character, Imm32(and_with),
@ -591,7 +591,7 @@ void
NativeRegExpMacroAssembler::CheckNotCharacterAfterAnd(unsigned c, unsigned and_with,
Label *on_not_equal)
{
IonSpew(SPEW_PREFIX "CheckNotCharacterAfterAnd(%d, %d)", (int) c, (int) and_with);
JitSpew(SPEW_PREFIX "CheckNotCharacterAfterAnd(%d, %d)", (int) c, (int) and_with);
if (c == 0) {
masm.branchTest32(Assembler::NonZero, current_character, Imm32(and_with),
@ -606,7 +606,7 @@ NativeRegExpMacroAssembler::CheckNotCharacterAfterAnd(unsigned c, unsigned and_w
void
NativeRegExpMacroAssembler::CheckCharacterGT(jschar c, Label* on_greater)
{
IonSpew(SPEW_PREFIX "CheckCharacterGT(%d)", (int) c);
JitSpew(SPEW_PREFIX "CheckCharacterGT(%d)", (int) c);
masm.branch32(Assembler::GreaterThan, current_character, Imm32(c),
BranchOrBacktrack(on_greater));
}
@ -614,14 +614,14 @@ NativeRegExpMacroAssembler::CheckCharacterGT(jschar c, Label* on_greater)
void
NativeRegExpMacroAssembler::CheckCharacterLT(jschar c, Label* on_less)
{
IonSpew(SPEW_PREFIX "CheckCharacterLT(%d)", (int) c);
JitSpew(SPEW_PREFIX "CheckCharacterLT(%d)", (int) c);
masm.branch32(Assembler::LessThan, current_character, Imm32(c), BranchOrBacktrack(on_less));
}
void
NativeRegExpMacroAssembler::CheckGreedyLoop(Label* on_tos_equals_current_position)
{
IonSpew(SPEW_PREFIX "CheckGreedyLoop");
JitSpew(SPEW_PREFIX "CheckGreedyLoop");
Label fallthrough;
masm.branchPtr(Assembler::NotEqual,
@ -635,7 +635,7 @@ NativeRegExpMacroAssembler::CheckGreedyLoop(Label* on_tos_equals_current_positio
void
NativeRegExpMacroAssembler::CheckNotBackReference(int start_reg, Label* on_no_match)
{
IonSpew(SPEW_PREFIX "CheckNotBackReference(%d)", start_reg);
JitSpew(SPEW_PREFIX "CheckNotBackReference(%d)", start_reg);
Label fallthrough;
Label success;
@ -706,7 +706,7 @@ NativeRegExpMacroAssembler::CheckNotBackReference(int start_reg, Label* on_no_ma
void
NativeRegExpMacroAssembler::CheckNotBackReferenceIgnoreCase(int start_reg, Label* on_no_match)
{
IonSpew(SPEW_PREFIX "CheckNotBackReferenceIgnoreCase(%d)", start_reg);
JitSpew(SPEW_PREFIX "CheckNotBackReferenceIgnoreCase(%d)", start_reg);
Label fallthrough;
@ -838,7 +838,7 @@ void
NativeRegExpMacroAssembler::CheckNotCharacterAfterMinusAnd(jschar c, jschar minus, jschar and_with,
Label* on_not_equal)
{
IonSpew(SPEW_PREFIX "CheckNotCharacterAfterMinusAnd(%d, %d, %d)", (int) c,
JitSpew(SPEW_PREFIX "CheckNotCharacterAfterMinusAnd(%d, %d, %d)", (int) c,
(int) minus, (int) and_with);
masm.computeEffectiveAddress(Address(current_character, -minus), temp0);
@ -855,7 +855,7 @@ void
NativeRegExpMacroAssembler::CheckCharacterInRange(jschar from, jschar to,
Label* on_in_range)
{
IonSpew(SPEW_PREFIX "CheckCharacterInRange(%d, %d)", (int) from, (int) to);
JitSpew(SPEW_PREFIX "CheckCharacterInRange(%d, %d)", (int) from, (int) to);
masm.computeEffectiveAddress(Address(current_character, -from), temp0);
masm.branch32(Assembler::BelowOrEqual, temp0, Imm32(to - from), BranchOrBacktrack(on_in_range));
@ -865,7 +865,7 @@ void
NativeRegExpMacroAssembler::CheckCharacterNotInRange(jschar from, jschar to,
Label* on_not_in_range)
{
IonSpew(SPEW_PREFIX "CheckCharacterNotInRange(%d, %d)", (int) from, (int) to);
JitSpew(SPEW_PREFIX "CheckCharacterNotInRange(%d, %d)", (int) from, (int) to);
masm.computeEffectiveAddress(Address(current_character, -from), temp0);
masm.branch32(Assembler::Above, temp0, Imm32(to - from), BranchOrBacktrack(on_not_in_range));
@ -874,7 +874,7 @@ NativeRegExpMacroAssembler::CheckCharacterNotInRange(jschar from, jschar to,
void
NativeRegExpMacroAssembler::CheckBitInTable(uint8_t *table, Label *on_bit_set)
{
IonSpew(SPEW_PREFIX "CheckBitInTable");
JitSpew(SPEW_PREFIX "CheckBitInTable");
masm.movePtr(ImmPtr(table), temp0);
@ -892,7 +892,7 @@ NativeRegExpMacroAssembler::CheckBitInTable(uint8_t *table, Label *on_bit_set)
void
NativeRegExpMacroAssembler::Fail()
{
IonSpew(SPEW_PREFIX "Fail");
JitSpew(SPEW_PREFIX "Fail");
if (!global())
masm.movePtr(ImmWord(RegExpRunStatus_Success_NotFound), temp0);
@ -902,7 +902,7 @@ NativeRegExpMacroAssembler::Fail()
void
NativeRegExpMacroAssembler::IfRegisterGE(int reg, int comparand, Label* if_ge)
{
IonSpew(SPEW_PREFIX "IfRegisterGE(%d, %d)", reg, comparand);
JitSpew(SPEW_PREFIX "IfRegisterGE(%d, %d)", reg, comparand);
masm.branchPtr(Assembler::GreaterThanOrEqual, register_location(reg), ImmWord(comparand),
BranchOrBacktrack(if_ge));
}
@ -910,7 +910,7 @@ NativeRegExpMacroAssembler::IfRegisterGE(int reg, int comparand, Label* if_ge)
void
NativeRegExpMacroAssembler::IfRegisterLT(int reg, int comparand, Label* if_lt)
{
IonSpew(SPEW_PREFIX "IfRegisterLT(%d, %d)", reg, comparand);
JitSpew(SPEW_PREFIX "IfRegisterLT(%d, %d)", reg, comparand);
masm.branchPtr(Assembler::LessThan, register_location(reg), ImmWord(comparand),
BranchOrBacktrack(if_lt));
}
@ -918,7 +918,7 @@ NativeRegExpMacroAssembler::IfRegisterLT(int reg, int comparand, Label* if_lt)
void
NativeRegExpMacroAssembler::IfRegisterEqPos(int reg, Label* if_eq)
{
IonSpew(SPEW_PREFIX "IfRegisterEqPos(%d)", reg);
JitSpew(SPEW_PREFIX "IfRegisterEqPos(%d)", reg);
masm.branchPtr(Assembler::Equal, register_location(reg), current_position,
BranchOrBacktrack(if_eq));
}
@ -927,7 +927,7 @@ void
NativeRegExpMacroAssembler::LoadCurrentCharacter(int cp_offset, Label* on_end_of_input,
bool check_bounds, int characters)
{
IonSpew(SPEW_PREFIX "LoadCurrentCharacter(%d, %d)", cp_offset, characters);
JitSpew(SPEW_PREFIX "LoadCurrentCharacter(%d, %d)", cp_offset, characters);
JS_ASSERT(cp_offset >= -1); // ^ and \b can look behind one character.
JS_ASSERT(cp_offset < (1<<30)); // Be sane! (And ensure negation works)
@ -939,7 +939,7 @@ NativeRegExpMacroAssembler::LoadCurrentCharacter(int cp_offset, Label* on_end_of
void
NativeRegExpMacroAssembler::LoadCurrentCharacterUnchecked(int cp_offset, int characters)
{
IonSpew(SPEW_PREFIX "LoadCurrentCharacterUnchecked(%d, %d)", cp_offset, characters);
JitSpew(SPEW_PREFIX "LoadCurrentCharacterUnchecked(%d, %d)", cp_offset, characters);
if (mode_ == ASCII) {
BaseIndex address(input_end_pointer, current_position, TimesOne, cp_offset);
@ -965,7 +965,7 @@ NativeRegExpMacroAssembler::LoadCurrentCharacterUnchecked(int cp_offset, int cha
void
NativeRegExpMacroAssembler::PopCurrentPosition()
{
IonSpew(SPEW_PREFIX "PopCurrentPosition");
JitSpew(SPEW_PREFIX "PopCurrentPosition");
PopBacktrack(current_position);
}
@ -973,7 +973,7 @@ NativeRegExpMacroAssembler::PopCurrentPosition()
void
NativeRegExpMacroAssembler::PopRegister(int register_index)
{
IonSpew(SPEW_PREFIX "PopRegister(%d)", register_index);
JitSpew(SPEW_PREFIX "PopRegister(%d)", register_index);
PopBacktrack(temp0);
masm.storePtr(temp0, register_location(register_index));
@ -982,7 +982,7 @@ NativeRegExpMacroAssembler::PopRegister(int register_index)
void
NativeRegExpMacroAssembler::PushBacktrack(Label *label)
{
IonSpew(SPEW_PREFIX "PushBacktrack");
JitSpew(SPEW_PREFIX "PushBacktrack");
CodeOffsetLabel patchOffset = masm.movWithPatch(ImmPtr(nullptr), temp0);
@ -997,7 +997,7 @@ NativeRegExpMacroAssembler::PushBacktrack(Label *label)
void
NativeRegExpMacroAssembler::BindBacktrack(Label *label)
{
IonSpew(SPEW_PREFIX "BindBacktrack");
JitSpew(SPEW_PREFIX "BindBacktrack");
Bind(label);
@ -1014,7 +1014,7 @@ NativeRegExpMacroAssembler::BindBacktrack(Label *label)
void
NativeRegExpMacroAssembler::PushBacktrack(Register source)
{
IonSpew(SPEW_PREFIX "PushBacktrack");
JitSpew(SPEW_PREFIX "PushBacktrack");
JS_ASSERT(source != backtrack_stack_pointer);
@ -1026,7 +1026,7 @@ NativeRegExpMacroAssembler::PushBacktrack(Register source)
void
NativeRegExpMacroAssembler::PushBacktrack(int32_t value)
{
IonSpew(SPEW_PREFIX "PushBacktrack(%d)", (int) value);
JitSpew(SPEW_PREFIX "PushBacktrack(%d)", (int) value);
// Notice: This updates flags, unlike normal Push.
masm.storePtr(ImmWord(value), Address(backtrack_stack_pointer, 0));
@ -1036,7 +1036,7 @@ NativeRegExpMacroAssembler::PushBacktrack(int32_t value)
void
NativeRegExpMacroAssembler::PopBacktrack(Register target)
{
IonSpew(SPEW_PREFIX "PopBacktrack");
JitSpew(SPEW_PREFIX "PopBacktrack");
JS_ASSERT(target != backtrack_stack_pointer);
@ -1048,7 +1048,7 @@ NativeRegExpMacroAssembler::PopBacktrack(Register target)
void
NativeRegExpMacroAssembler::CheckBacktrackStackLimit()
{
IonSpew(SPEW_PREFIX "CheckBacktrackStackLimit");
JitSpew(SPEW_PREFIX "CheckBacktrackStackLimit");
const void *limitAddr = runtime->mainThread.regexpStack.addressOfLimit();
@ -1069,7 +1069,7 @@ NativeRegExpMacroAssembler::CheckBacktrackStackLimit()
void
NativeRegExpMacroAssembler::PushCurrentPosition()
{
IonSpew(SPEW_PREFIX "PushCurrentPosition");
JitSpew(SPEW_PREFIX "PushCurrentPosition");
PushBacktrack(current_position);
}
@ -1077,7 +1077,7 @@ NativeRegExpMacroAssembler::PushCurrentPosition()
void
NativeRegExpMacroAssembler::PushRegister(int register_index, StackCheckFlag check_stack_limit)
{
IonSpew(SPEW_PREFIX "PushRegister(%d)", register_index);
JitSpew(SPEW_PREFIX "PushRegister(%d)", register_index);
masm.loadPtr(register_location(register_index), temp0);
PushBacktrack(temp0);
@ -1088,7 +1088,7 @@ NativeRegExpMacroAssembler::PushRegister(int register_index, StackCheckFlag chec
void
NativeRegExpMacroAssembler::ReadCurrentPositionFromRegister(int reg)
{
IonSpew(SPEW_PREFIX "ReadCurrentPositionFromRegister(%d)", reg);
JitSpew(SPEW_PREFIX "ReadCurrentPositionFromRegister(%d)", reg);
masm.loadPtr(register_location(reg), current_position);
}
@ -1096,7 +1096,7 @@ NativeRegExpMacroAssembler::ReadCurrentPositionFromRegister(int reg)
void
NativeRegExpMacroAssembler::WriteCurrentPositionToRegister(int reg, int cp_offset)
{
IonSpew(SPEW_PREFIX "WriteCurrentPositionToRegister(%d, %d)", reg, cp_offset);
JitSpew(SPEW_PREFIX "WriteCurrentPositionToRegister(%d, %d)", reg, cp_offset);
if (cp_offset == 0) {
masm.storePtr(current_position, register_location(reg));
@ -1109,7 +1109,7 @@ NativeRegExpMacroAssembler::WriteCurrentPositionToRegister(int reg, int cp_offse
void
NativeRegExpMacroAssembler::ReadBacktrackStackPointerFromRegister(int reg)
{
IonSpew(SPEW_PREFIX "ReadBacktrackStackPointerFromRegister(%d)", reg);
JitSpew(SPEW_PREFIX "ReadBacktrackStackPointerFromRegister(%d)", reg);
masm.loadPtr(register_location(reg), backtrack_stack_pointer);
masm.addPtr(Address(StackPointer, offsetof(FrameData, backtrackStackBase)), backtrack_stack_pointer);
@ -1118,7 +1118,7 @@ NativeRegExpMacroAssembler::ReadBacktrackStackPointerFromRegister(int reg)
void
NativeRegExpMacroAssembler::WriteBacktrackStackPointerToRegister(int reg)
{
IonSpew(SPEW_PREFIX "WriteBacktrackStackPointerToRegister(%d)", reg);
JitSpew(SPEW_PREFIX "WriteBacktrackStackPointerToRegister(%d)", reg);
masm.movePtr(backtrack_stack_pointer, temp0);
masm.subPtr(Address(StackPointer, offsetof(FrameData, backtrackStackBase)), temp0);
@ -1128,7 +1128,7 @@ NativeRegExpMacroAssembler::WriteBacktrackStackPointerToRegister(int reg)
void
NativeRegExpMacroAssembler::SetCurrentPositionFromEnd(int by)
{
IonSpew(SPEW_PREFIX "SetCurrentPositionFromEnd(%d)", by);
JitSpew(SPEW_PREFIX "SetCurrentPositionFromEnd(%d)", by);
Label after_position;
masm.branchPtr(Assembler::GreaterThanOrEqual, current_position,
@ -1145,7 +1145,7 @@ NativeRegExpMacroAssembler::SetCurrentPositionFromEnd(int by)
void
NativeRegExpMacroAssembler::SetRegister(int register_index, int to)
{
IonSpew(SPEW_PREFIX "SetRegister(%d, %d)", register_index, to);
JitSpew(SPEW_PREFIX "SetRegister(%d, %d)", register_index, to);
JS_ASSERT(register_index >= num_saved_registers_); // Reserved for positions!
masm.storePtr(ImmWord(to), register_location(register_index));
@ -1154,7 +1154,7 @@ NativeRegExpMacroAssembler::SetRegister(int register_index, int to)
bool
NativeRegExpMacroAssembler::Succeed()
{
IonSpew(SPEW_PREFIX "Succeed");
JitSpew(SPEW_PREFIX "Succeed");
masm.jump(&success_label_);
return global();
@ -1163,7 +1163,7 @@ NativeRegExpMacroAssembler::Succeed()
void
NativeRegExpMacroAssembler::ClearRegisters(int reg_from, int reg_to)
{
IonSpew(SPEW_PREFIX "ClearRegisters(%d, %d)", reg_from, reg_to);
JitSpew(SPEW_PREFIX "ClearRegisters(%d, %d)", reg_from, reg_to);
JS_ASSERT(reg_from <= reg_to);
masm.loadPtr(Address(StackPointer, offsetof(FrameData, inputStartMinusOne)), temp0);
@ -1174,7 +1174,7 @@ NativeRegExpMacroAssembler::ClearRegisters(int reg_from, int reg_to)
void
NativeRegExpMacroAssembler::CheckPosition(int cp_offset, Label* on_outside_input)
{
IonSpew(SPEW_PREFIX "CheckPosition(%d)", cp_offset);
JitSpew(SPEW_PREFIX "CheckPosition(%d)", cp_offset);
masm.branchPtr(Assembler::GreaterThanOrEqual, current_position,
ImmWord(-cp_offset * char_size()), BranchOrBacktrack(on_outside_input));
}
@ -1190,7 +1190,7 @@ NativeRegExpMacroAssembler::BranchOrBacktrack(Label *branch)
void
NativeRegExpMacroAssembler::JumpOrBacktrack(Label *to)
{
IonSpew(SPEW_PREFIX "JumpOrBacktrack");
JitSpew(SPEW_PREFIX "JumpOrBacktrack");
if (to)
masm.jump(to);
@ -1201,7 +1201,7 @@ NativeRegExpMacroAssembler::JumpOrBacktrack(Label *to)
bool
NativeRegExpMacroAssembler::CheckSpecialCharacterClass(jschar type, Label* on_no_match)
{
IonSpew(SPEW_PREFIX "CheckSpecialCharacterClass(%d)", (int) type);
JitSpew(SPEW_PREFIX "CheckSpecialCharacterClass(%d)", (int) type);
Label *branch = BranchOrBacktrack(on_no_match);

View File

@ -10,7 +10,7 @@
#include "jit/Ion.h"
#include "jit/IonBuilder.h"
#include "jit/IonSpewer.h"
#include "jit/JitSpewer.h"
#include "jit/MIR.h"
#include "jit/MIRGraph.h"
@ -125,25 +125,25 @@ BlockMightReach(MBasicBlock *src, MBasicBlock *dest)
static void
IonSpewDependency(MDefinition *load, MDefinition *store, const char *verb, const char *reason)
{
if (!IonSpewEnabled(IonSpew_Alias))
if (!JitSpewEnabled(JitSpew_Alias))
return;
fprintf(IonSpewFile, "Load ");
load->printName(IonSpewFile);
fprintf(IonSpewFile, " %s on store ", verb);
store->printName(IonSpewFile);
fprintf(IonSpewFile, " (%s)\n", reason);
fprintf(JitSpewFile, "Load ");
load->printName(JitSpewFile);
fprintf(JitSpewFile, " %s on store ", verb);
store->printName(JitSpewFile);
fprintf(JitSpewFile, " (%s)\n", reason);
}
static void
IonSpewAliasInfo(const char *pre, MDefinition *ins, const char *post)
{
if (!IonSpewEnabled(IonSpew_Alias))
if (!JitSpewEnabled(JitSpew_Alias))
return;
fprintf(IonSpewFile, "%s ", pre);
ins->printName(IonSpewFile);
fprintf(IonSpewFile, " %s\n", post);
fprintf(JitSpewFile, "%s ", pre);
ins->printName(JitSpewFile);
fprintf(JitSpewFile, " %s\n", post);
}
// This pass annotates every load instruction with the last store instruction
@ -184,7 +184,7 @@ AliasAnalysis::analyze()
return false;
if (block->isLoopHeader()) {
IonSpew(IonSpew_Alias, "Processing loop header %d", block->id());
JitSpew(JitSpew_Alias, "Processing loop header %d", block->id());
loop_ = new(alloc()) LoopAliasInfo(alloc(), loop_, *block);
}
@ -201,10 +201,10 @@ AliasAnalysis::analyze()
return false;
}
if (IonSpewEnabled(IonSpew_Alias)) {
fprintf(IonSpewFile, "Processing store ");
def->printName(IonSpewFile);
fprintf(IonSpewFile, " (flags %x)\n", set.flags());
if (JitSpewEnabled(JitSpew_Alias)) {
fprintf(JitSpewFile, "Processing store ");
def->printName(JitSpewFile);
fprintf(JitSpewFile, " (flags %x)\n", set.flags());
}
} else {
// Find the most recent store on which this instruction depends.
@ -240,7 +240,7 @@ AliasAnalysis::analyze()
if (block->isLoopBackedge()) {
JS_ASSERT(loop_->loopHeader() == block->loopHeaderOfBackedge());
IonSpew(IonSpew_Alias, "Processing loop backedge %d (header %d)", block->id(),
JitSpew(JitSpew_Alias, "Processing loop backedge %d (header %d)", block->id(),
loop_->loopHeader()->id());
LoopAliasInfo *outerLoop = loop_->outer();
MInstruction *firstLoopIns = *loop_->loopHeader()->begin();

View File

@ -124,7 +124,7 @@ BacktrackingAllocator::init()
bool
BacktrackingAllocator::go()
{
IonSpew(IonSpew_RegAlloc, "Beginning register allocation");
JitSpew(JitSpew_RegAlloc, "Beginning register allocation");
if (!buildLivenessInfo())
return false;
@ -132,21 +132,21 @@ BacktrackingAllocator::go()
if (!init())
return false;
if (IonSpewEnabled(IonSpew_RegAlloc))
if (JitSpewEnabled(JitSpew_RegAlloc))
dumpFixedRanges();
if (!allocationQueue.reserve(graph.numVirtualRegisters() * 3 / 2))
return false;
IonSpew(IonSpew_RegAlloc, "Beginning grouping and queueing registers");
JitSpew(JitSpew_RegAlloc, "Beginning grouping and queueing registers");
if (!groupAndQueueRegisters())
return false;
IonSpew(IonSpew_RegAlloc, "Grouping and queueing registers complete");
JitSpew(JitSpew_RegAlloc, "Grouping and queueing registers complete");
if (IonSpewEnabled(IonSpew_RegAlloc))
if (JitSpewEnabled(JitSpew_RegAlloc))
dumpRegisterGroups();
IonSpew(IonSpew_RegAlloc, "Beginning main allocation loop");
JitSpew(JitSpew_RegAlloc, "Beginning main allocation loop");
// Allocate, spill and split register intervals until finished.
while (!allocationQueue.empty()) {
if (mir->shouldCancel("Backtracking Allocation"))
@ -156,9 +156,9 @@ BacktrackingAllocator::go()
if (item.interval ? !processInterval(item.interval) : !processGroup(item.group))
return false;
}
IonSpew(IonSpew_RegAlloc, "Main allocation loop complete");
JitSpew(JitSpew_RegAlloc, "Main allocation loop complete");
if (IonSpewEnabled(IonSpew_RegAlloc))
if (JitSpewEnabled(JitSpew_RegAlloc))
dumpAllocations();
return resolveControlFlow() && reifyAllocations() && populateSafepoints();
@ -342,7 +342,7 @@ BacktrackingAllocator::tryGroupReusedRegister(uint32_t def, uint32_t use)
distributeUses(interval, newIntervals);
IonSpew(IonSpew_RegAlloc, " splitting reused input at %u to try to help grouping",
JitSpew(JitSpew_RegAlloc, " splitting reused input at %u to try to help grouping",
inputOf(reg.ins()));
if (!split(interval, newIntervals))
@ -449,7 +449,7 @@ BacktrackingAllocator::tryAllocateFixed(LiveInterval *interval, bool *success,
{
// Spill intervals which are required to be in a certain stack slot.
if (!interval->requirement()->allocation().isRegister()) {
IonSpew(IonSpew_RegAlloc, " stack allocation requirement");
JitSpew(JitSpew_RegAlloc, " stack allocation requirement");
interval->setAllocation(interval->requirement()->allocation());
*success = true;
return true;
@ -512,8 +512,8 @@ BacktrackingAllocator::tryAllocateNonFixed(LiveInterval *interval, bool *success
bool
BacktrackingAllocator::processInterval(LiveInterval *interval)
{
if (IonSpewEnabled(IonSpew_RegAlloc)) {
IonSpew(IonSpew_RegAlloc, "Allocating %s [priority %lu] [weight %lu]",
if (JitSpewEnabled(JitSpew_RegAlloc)) {
JitSpew(JitSpew_RegAlloc, "Allocating %s [priority %lu] [weight %lu]",
interval->toString(), computePriority(interval), computeSpillWeight(interval));
}
@ -590,8 +590,8 @@ BacktrackingAllocator::processInterval(LiveInterval *interval)
bool
BacktrackingAllocator::processGroup(VirtualRegisterGroup *group)
{
if (IonSpewEnabled(IonSpew_RegAlloc)) {
IonSpew(IonSpew_RegAlloc, "Allocating group v%u [priority %lu] [weight %lu]",
if (JitSpewEnabled(JitSpew_RegAlloc)) {
JitSpew(JitSpew_RegAlloc, "Allocating group v%u [priority %lu] [weight %lu]",
group->registers[0], computePriority(group), computeSpillWeight(group));
}
@ -647,8 +647,8 @@ BacktrackingAllocator::setIntervalRequirement(LiveInterval *interval)
// Set a hint if another interval in the same group is in a register.
if (VirtualRegisterGroup *group = reg->group()) {
if (group->allocation.isRegister()) {
if (IonSpewEnabled(IonSpew_RegAlloc)) {
IonSpew(IonSpew_RegAlloc, " Hint %s, used by group allocation",
if (JitSpewEnabled(JitSpew_RegAlloc)) {
JitSpew(JitSpew_RegAlloc, " Hint %s, used by group allocation",
group->allocation.toString());
}
interval->setHint(Requirement(group->allocation));
@ -662,8 +662,8 @@ BacktrackingAllocator::setIntervalRequirement(LiveInterval *interval)
LDefinition::Policy policy = reg->def()->policy();
if (policy == LDefinition::FIXED) {
// Fixed policies get a FIXED requirement.
if (IonSpewEnabled(IonSpew_RegAlloc)) {
IonSpew(IonSpew_RegAlloc, " Requirement %s, fixed by definition",
if (JitSpewEnabled(JitSpew_RegAlloc)) {
JitSpew(JitSpew_RegAlloc, " Requirement %s, fixed by definition",
reg->def()->output()->toString());
}
interval->setRequirement(Requirement(*reg->def()->output()));
@ -685,8 +685,8 @@ BacktrackingAllocator::setIntervalRequirement(LiveInterval *interval)
if (policy == LUse::FIXED) {
AnyRegister required = GetFixedRegister(reg->def(), iter->use);
if (IonSpewEnabled(IonSpew_RegAlloc)) {
IonSpew(IonSpew_RegAlloc, " Requirement %s, due to use at %u",
if (JitSpewEnabled(JitSpew_RegAlloc)) {
JitSpew(JitSpew_RegAlloc, " Requirement %s, due to use at %u",
required.name(), iter->pos.bits());
}
@ -779,8 +779,8 @@ BacktrackingAllocator::tryAllocateRegister(PhysicalRegister &r, LiveInterval *in
if (!rAlias.allocations.contains(range, &existing))
continue;
if (existing.interval->hasVreg()) {
if (IonSpewEnabled(IonSpew_RegAlloc)) {
IonSpew(IonSpew_RegAlloc, " %s collides with v%u[%u] %s [weight %lu]",
if (JitSpewEnabled(JitSpew_RegAlloc)) {
JitSpew(JitSpew_RegAlloc, " %s collides with v%u[%u] %s [weight %lu]",
rAlias.reg.name(), existing.interval->vreg(),
existing.interval->index(),
existing.range->toString(),
@ -789,8 +789,8 @@ BacktrackingAllocator::tryAllocateRegister(PhysicalRegister &r, LiveInterval *in
if (!*pconflicting || computeSpillWeight(existing.interval) < computeSpillWeight(*pconflicting))
*pconflicting = existing.interval;
} else {
if (IonSpewEnabled(IonSpew_RegAlloc)) {
IonSpew(IonSpew_RegAlloc, " %s collides with fixed use %s",
if (JitSpewEnabled(JitSpew_RegAlloc)) {
JitSpew(JitSpew_RegAlloc, " %s collides with fixed use %s",
rAlias.reg.name(), existing.range->toString());
}
*pfixed = true;
@ -799,7 +799,7 @@ BacktrackingAllocator::tryAllocateRegister(PhysicalRegister &r, LiveInterval *in
}
}
IonSpew(IonSpew_RegAlloc, " allocated to %s", r.reg.name());
JitSpew(JitSpew_RegAlloc, " allocated to %s", r.reg.name());
for (size_t i = 0; i < interval->numRanges(); i++) {
AllocatedRange range(interval, interval->getRange(i));
@ -821,8 +821,8 @@ BacktrackingAllocator::tryAllocateRegister(PhysicalRegister &r, LiveInterval *in
bool
BacktrackingAllocator::evictInterval(LiveInterval *interval)
{
if (IonSpewEnabled(IonSpew_RegAlloc)) {
IonSpew(IonSpew_RegAlloc, " Evicting %s [priority %lu] [weight %lu]",
if (JitSpewEnabled(JitSpew_RegAlloc)) {
JitSpew(JitSpew_RegAlloc, " Evicting %s [priority %lu] [weight %lu]",
interval->toString(), computePriority(interval), computeSpillWeight(interval));
}
@ -874,10 +874,10 @@ bool
BacktrackingAllocator::split(LiveInterval *interval,
const LiveIntervalVector &newIntervals)
{
if (IonSpewEnabled(IonSpew_RegAlloc)) {
IonSpew(IonSpew_RegAlloc, " splitting interval %s into:", interval->toString());
if (JitSpewEnabled(JitSpew_RegAlloc)) {
JitSpew(JitSpew_RegAlloc, " splitting interval %s into:", interval->toString());
for (size_t i = 0; i < newIntervals.length(); i++) {
IonSpew(IonSpew_RegAlloc, " %s", newIntervals[i]->toString());
JitSpew(JitSpew_RegAlloc, " %s", newIntervals[i]->toString());
JS_ASSERT(newIntervals[i]->start() >= interval->start());
JS_ASSERT(newIntervals[i]->end() <= interval->end());
}
@ -918,7 +918,7 @@ bool BacktrackingAllocator::requeueIntervals(const LiveIntervalVector &newInterv
void
BacktrackingAllocator::spill(LiveInterval *interval)
{
IonSpew(IonSpew_RegAlloc, " Spilling interval");
JitSpew(JitSpew_RegAlloc, " Spilling interval");
JS_ASSERT(interval->requirement()->kind() == Requirement::NONE);
JS_ASSERT(!interval->getAllocation()->isStackSlot());
@ -929,7 +929,7 @@ BacktrackingAllocator::spill(LiveInterval *interval)
BacktrackingVirtualRegister *reg = &vregs[interval->vreg()];
if (LiveInterval *spillInterval = interval->spillInterval()) {
IonSpew(IonSpew_RegAlloc, " Spilling to existing spill interval");
JitSpew(JitSpew_RegAlloc, " Spilling to existing spill interval");
while (!interval->usesEmpty())
spillInterval->addUse(interval->popUse());
reg->removeInterval(interval);
@ -941,14 +941,14 @@ BacktrackingAllocator::spill(LiveInterval *interval)
if (useCanonical) {
if (reg->canonicalSpill()) {
IonSpew(IonSpew_RegAlloc, " Picked canonical spill location %s",
JitSpew(JitSpew_RegAlloc, " Picked canonical spill location %s",
reg->canonicalSpill()->toString());
interval->setAllocation(*reg->canonicalSpill());
return;
}
if (reg->group() && !reg->group()->spill.isUse()) {
IonSpew(IonSpew_RegAlloc, " Reusing group spill location %s",
JitSpew(JitSpew_RegAlloc, " Reusing group spill location %s",
reg->group()->spill.toString());
interval->setAllocation(reg->group()->spill);
reg->setCanonicalSpill(reg->group()->spill);
@ -962,7 +962,7 @@ BacktrackingAllocator::spill(LiveInterval *interval)
LStackSlot alloc(stackSlot);
interval->setAllocation(alloc);
IonSpew(IonSpew_RegAlloc, " Allocating spill location %s", alloc.toString());
JitSpew(JitSpew_RegAlloc, " Allocating spill location %s", alloc.toString());
if (useCanonical) {
reg->setCanonicalSpill(alloc);
@ -976,7 +976,7 @@ BacktrackingAllocator::spill(LiveInterval *interval)
bool
BacktrackingAllocator::resolveControlFlow()
{
IonSpew(IonSpew_RegAlloc, "Resolving control flow (vreg loop)");
JitSpew(JitSpew_RegAlloc, "Resolving control flow (vreg loop)");
// Virtual register number 0 is unused.
JS_ASSERT(vregs[0u].numIntervals() == 0);
@ -1020,7 +1020,7 @@ BacktrackingAllocator::resolveControlFlow()
}
}
IonSpew(IonSpew_RegAlloc, "Resolving control flow (block loop)");
JitSpew(JitSpew_RegAlloc, "Resolving control flow (block loop)");
for (size_t i = 0; i < graph.numBlocks(); i++) {
if (mir->shouldCancel("Backtracking Resolve Control Flow (block loop)"))
@ -1130,7 +1130,7 @@ BacktrackingAllocator::isRegisterDefinition(LiveInterval *interval)
bool
BacktrackingAllocator::reifyAllocations()
{
IonSpew(IonSpew_RegAlloc, "Reifying Allocations");
JitSpew(JitSpew_RegAlloc, "Reifying Allocations");
// Virtual register number 0 is unused.
JS_ASSERT(vregs[0u].numIntervals() == 0);
@ -1192,7 +1192,7 @@ BacktrackingAllocator::reifyAllocations()
bool
BacktrackingAllocator::populateSafepoints()
{
IonSpew(IonSpew_RegAlloc, "Populating Safepoints");
JitSpew(JitSpew_RegAlloc, "Populating Safepoints");
size_t firstSafepoint = 0;
@ -1548,7 +1548,7 @@ BacktrackingAllocator::trySplitAcrossHotcode(LiveInterval *interval, bool *succe
// Don't split if there is no hot code in the interval.
if (!hotRange) {
IonSpew(IonSpew_RegAlloc, " interval does not contain hot code");
JitSpew(JitSpew_RegAlloc, " interval does not contain hot code");
return true;
}
@ -1561,11 +1561,11 @@ BacktrackingAllocator::trySplitAcrossHotcode(LiveInterval *interval, bool *succe
}
}
if (!coldCode) {
IonSpew(IonSpew_RegAlloc, " interval does not contain cold code");
JitSpew(JitSpew_RegAlloc, " interval does not contain cold code");
return true;
}
IonSpew(IonSpew_RegAlloc, " split across hot range %s", hotRange->toString());
JitSpew(JitSpew_RegAlloc, " split across hot range %s", hotRange->toString());
SplitPositions splitPositions;
if (!splitPositions.append(hotRange->from) || !splitPositions.append(hotRange->to))
@ -1614,15 +1614,15 @@ BacktrackingAllocator::trySplitAfterLastRegisterUse(LiveInterval *interval, Live
// Can't trim non-register uses off the end by splitting.
if (!lastRegisterFrom.bits()) {
IonSpew(IonSpew_RegAlloc, " interval has no register uses");
JitSpew(JitSpew_RegAlloc, " interval has no register uses");
return true;
}
if (lastRegisterFrom == lastUse) {
IonSpew(IonSpew_RegAlloc, " interval's last use is a register use");
JitSpew(JitSpew_RegAlloc, " interval's last use is a register use");
return true;
}
IonSpew(IonSpew_RegAlloc, " split after last register use at %u",
JitSpew(JitSpew_RegAlloc, " split after last register use at %u",
lastRegisterTo.bits());
SplitPositions splitPositions;
@ -1640,11 +1640,11 @@ BacktrackingAllocator::trySplitBeforeFirstRegisterUse(LiveInterval *interval, Li
// is specified, only consider register uses after the conflict ends.
if (isRegisterDefinition(interval)) {
IonSpew(IonSpew_RegAlloc, " interval is defined by a register");
JitSpew(JitSpew_RegAlloc, " interval is defined by a register");
return true;
}
if (interval->index() != 0) {
IonSpew(IonSpew_RegAlloc, " interval is not defined in memory");
JitSpew(JitSpew_RegAlloc, " interval is not defined in memory");
return true;
}
@ -1667,11 +1667,11 @@ BacktrackingAllocator::trySplitBeforeFirstRegisterUse(LiveInterval *interval, Li
if (!firstRegisterFrom.bits()) {
// Can't trim non-register uses off the beginning by splitting.
IonSpew(IonSpew_RegAlloc, " interval has no register uses");
JitSpew(JitSpew_RegAlloc, " interval has no register uses");
return true;
}
IonSpew(IonSpew_RegAlloc, " split before first register use at %u",
JitSpew(JitSpew_RegAlloc, " split before first register use at %u",
firstRegisterFrom.bits());
SplitPositions splitPositions;
@ -1690,7 +1690,7 @@ BacktrackingAllocator::splitAtAllRegisterUses(LiveInterval *interval)
LiveIntervalVector newIntervals;
uint32_t vreg = interval->vreg();
IonSpew(IonSpew_RegAlloc, " split at all register uses");
JitSpew(JitSpew_RegAlloc, " split at all register uses");
// If this LiveInterval is the result of an earlier split which created a
// spill interval, that spill interval covers the whole range, so we don't
@ -1872,18 +1872,18 @@ BacktrackingAllocator::splitAcrossCalls(LiveInterval *interval)
// the backtracking allocator. fixedIntervalsUnion is sorted backwards, so
// iterate through it backwards.
SplitPositions callPositions;
IonSpewStart(IonSpew_RegAlloc, " split across calls at ");
JitSpewStart(JitSpew_RegAlloc, " split across calls at ");
for (size_t i = fixedIntervalsUnion->numRanges(); i > 0; i--) {
const LiveInterval::Range *range = fixedIntervalsUnion->getRange(i - 1);
if (interval->covers(range->from) && interval->covers(range->from.previous())) {
if (!callPositions.empty())
IonSpewCont(IonSpew_RegAlloc, ", ");
IonSpewCont(IonSpew_RegAlloc, "%u", range->from);
JitSpewCont(JitSpew_RegAlloc, ", ");
JitSpewCont(JitSpew_RegAlloc, "%u", range->from);
if (!callPositions.append(range->from))
return false;
}
}
IonSpewFin(IonSpew_RegAlloc);
JitSpewFin(JitSpew_RegAlloc);
return splitAt(interval, callPositions);
}

View File

@ -10,8 +10,8 @@
#include "jit/BaselineJIT.h"
#include "jit/Ion.h"
#include "jit/IonSpewer.h"
#include "jit/JitCompartment.h"
#include "jit/JitSpewer.h"
#include "jit/Snapshots.h"
#include "vm/TraceLogging.h"
@ -91,7 +91,7 @@ jit::Bailout(BailoutStack *sp, BaselineBailoutInfo **bailoutInfo)
TraceLogger *logger = TraceLoggerForMainThread(cx->runtime());
TraceLogTimestamp(logger, TraceLogger::Bailout);
IonSpew(IonSpew_Bailouts, "Took bailout! Snapshot offset: %d", iter.snapshotOffset());
JitSpew(JitSpew_Bailouts, "Took bailout! Snapshot offset: %d", iter.snapshotOffset());
JS_ASSERT(IsBaselineEnabled(cx));
@ -144,7 +144,7 @@ jit::InvalidationBailout(InvalidationBailoutStack *sp, size_t *frameSizeOut,
TraceLogger *logger = TraceLoggerForMainThread(cx->runtime());
TraceLogTimestamp(logger, TraceLogger::Invalidation);
IonSpew(IonSpew_Bailouts, "Took invalidation bailout! Snapshot offset: %d", iter.snapshotOffset());
JitSpew(JitSpew_Bailouts, "Took invalidation bailout! Snapshot offset: %d", iter.snapshotOffset());
// Note: the frame size must be computed before we return from this function.
*frameSizeOut = iter.topFrameSize();
@ -176,18 +176,18 @@ jit::InvalidationBailout(InvalidationBailoutStack *sp, size_t *frameSizeOut,
probes::ExitScript(cx, script, script->functionNonDelazifying(), popSPSFrame);
IonJSFrameLayout *frame = iter.jsFrame();
IonSpew(IonSpew_Invalidate, "Bailout failed (%s): converting to exit frame",
JitSpew(JitSpew_Invalidate, "Bailout failed (%s): converting to exit frame",
(retval == BAILOUT_RETURN_FATAL_ERROR) ? "Fatal Error" : "Over Recursion");
IonSpew(IonSpew_Invalidate, " orig calleeToken %p", (void *) frame->calleeToken());
IonSpew(IonSpew_Invalidate, " orig frameSize %u", unsigned(frame->prevFrameLocalSize()));
IonSpew(IonSpew_Invalidate, " orig ra %p", (void *) frame->returnAddress());
JitSpew(JitSpew_Invalidate, " orig calleeToken %p", (void *) frame->calleeToken());
JitSpew(JitSpew_Invalidate, " orig frameSize %u", unsigned(frame->prevFrameLocalSize()));
JitSpew(JitSpew_Invalidate, " orig ra %p", (void *) frame->returnAddress());
frame->replaceCalleeToken(nullptr);
EnsureExitFrame(frame);
IonSpew(IonSpew_Invalidate, " new calleeToken %p", (void *) frame->calleeToken());
IonSpew(IonSpew_Invalidate, " new frameSize %u", unsigned(frame->prevFrameLocalSize()));
IonSpew(IonSpew_Invalidate, " new ra %p", (void *) frame->returnAddress());
JitSpew(JitSpew_Invalidate, " new calleeToken %p", (void *) frame->calleeToken());
JitSpew(JitSpew_Invalidate, " new frameSize %u", unsigned(frame->prevFrameLocalSize()));
JitSpew(JitSpew_Invalidate, " new ra %p", (void *) frame->returnAddress());
}
iter.ionScript()->decref(cx->runtime()->defaultFreeOp());
@ -288,7 +288,7 @@ jit::CheckFrequentBailouts(JSContext *cx, JSScript *script)
{
script->setHadFrequentBailouts();
IonSpew(IonSpew_Invalidate, "Invalidating due to too many bailouts");
JitSpew(JitSpew_Invalidate, "Invalidating due to too many bailouts");
if (!Invalidate(cx, script))
return false;

View File

@ -9,7 +9,7 @@
#include "jit/BaselineIC.h"
#include "jit/BaselineJIT.h"
#include "jit/CompileInfo.h"
#include "jit/IonSpewer.h"
#include "jit/JitSpewer.h"
#include "jit/mips/Simulator-mips.h"
#include "jit/Recover.h"
#include "jit/RematerializedFrame.h"
@ -182,7 +182,7 @@ struct BaselineStackBuilder
bufferUsed_ += size;
framePushed_ += size;
if (info) {
IonSpew(IonSpew_BaselineBailouts,
JitSpew(JitSpew_BaselineBailouts,
" SUB_%03d %p/%p %-15s",
(int) size, header_->copyStackBottom, virtualPointerAtStackOffset(0), info);
}
@ -202,7 +202,7 @@ struct BaselineStackBuilder
if (!write<T *>(t))
return false;
if (info)
IonSpew(IonSpew_BaselineBailouts,
JitSpew(JitSpew_BaselineBailouts,
" WRITE_PTR %p/%p %-15s %p",
header_->copyStackBottom, virtualPointerAtStackOffset(0), info, t);
return true;
@ -213,11 +213,11 @@ struct BaselineStackBuilder
return false;
if (info) {
if (sizeof(size_t) == 4) {
IonSpew(IonSpew_BaselineBailouts,
JitSpew(JitSpew_BaselineBailouts,
" WRITE_WRD %p/%p %-15s %08x",
header_->copyStackBottom, virtualPointerAtStackOffset(0), info, w);
} else {
IonSpew(IonSpew_BaselineBailouts,
JitSpew(JitSpew_BaselineBailouts,
" WRITE_WRD %p/%p %-15s %016llx",
header_->copyStackBottom, virtualPointerAtStackOffset(0), info, w);
}
@ -229,7 +229,7 @@ struct BaselineStackBuilder
if (!write<Value>(val))
return false;
if (info) {
IonSpew(IonSpew_BaselineBailouts,
JitSpew(JitSpew_BaselineBailouts,
" WRITE_VAL %p/%p %-15s %016llx",
header_->copyStackBottom, virtualPointerAtStackOffset(0), info,
*((uint64_t *) &val));
@ -529,8 +529,8 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
// | ReturnAddr | <-- return into main jitcode after IC
// +===============+
IonSpew(IonSpew_BaselineBailouts, " Unpacking %s:%d", script->filename(), script->lineno());
IonSpew(IonSpew_BaselineBailouts, " [BASELINE-JS FRAME]");
JitSpew(JitSpew_BaselineBailouts, " Unpacking %s:%d", script->filename(), script->lineno());
JitSpew(JitSpew_BaselineBailouts, " [BASELINE-JS FRAME]");
// Calculate and write the previous frame pointer value.
// Record the virtual stack offset at this location. Later on, if we end up
@ -549,7 +549,7 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
// Initialize BaselineFrame::frameSize
uint32_t frameSize = BaselineFrame::Size() + BaselineFrame::FramePointerOffset +
(sizeof(Value) * (script->nfixed() + exprStackSlots));
IonSpew(IonSpew_BaselineBailouts, " FrameSize=%d", (int) frameSize);
JitSpew(JitSpew_BaselineBailouts, " FrameSize=%d", (int) frameSize);
blFrame->setFrameSize(frameSize);
uint32_t flags = 0;
@ -559,7 +559,7 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
// that will be fixed later.
if (ionScript->hasSPSInstrumentation()) {
if (callerPC == nullptr) {
IonSpew(IonSpew_BaselineBailouts, " Setting SPS flag on top frame!");
JitSpew(JitSpew_BaselineBailouts, " Setting SPS flag on top frame!");
flags |= BaselineFrame::HAS_PUSHED_SPS_FRAME;
}
}
@ -574,7 +574,7 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
// bogus (we can fail before the scope chain slot is set). Strip the
// hasScopeChain flag and this will be fixed up later in |FinishBailoutToBaseline|,
// which calls |EnsureHasScopeObjects|.
IonSpew(IonSpew_BaselineBailouts, " Bailout_ArgumentCheck! (no valid scopeChain)");
JitSpew(JitSpew_BaselineBailouts, " Bailout_ArgumentCheck! (no valid scopeChain)");
iter.skip();
// skip |return value|
@ -583,7 +583,7 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
// Scripts with |argumentsHasVarBinding| have an extra slot.
if (script->argumentsHasVarBinding()) {
IonSpew(IonSpew_BaselineBailouts,
JitSpew(JitSpew_BaselineBailouts,
" Bailout_ArgumentCheck for script with argumentsHasVarBinding!"
"Using empty arguments object");
iter.skip();
@ -629,9 +629,9 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
argsObj = &v.toObject().as<ArgumentsObject>();
}
}
IonSpew(IonSpew_BaselineBailouts, " ScopeChain=%p", scopeChain);
JitSpew(JitSpew_BaselineBailouts, " ScopeChain=%p", scopeChain);
blFrame->setScopeChain(scopeChain);
IonSpew(IonSpew_BaselineBailouts, " ReturnValue=%016llx", *((uint64_t *) &returnValue));
JitSpew(JitSpew_BaselineBailouts, " ReturnValue=%016llx", *((uint64_t *) &returnValue));
blFrame->setReturnValue(returnValue);
// Do not need to initialize scratchValue field in BaselineFrame.
@ -645,14 +645,14 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
// The unpacked thisv and arguments should overwrite the pushed args present
// in the calling frame.
Value thisv = iter.read();
IonSpew(IonSpew_BaselineBailouts, " Is function!");
IonSpew(IonSpew_BaselineBailouts, " thisv=%016llx", *((uint64_t *) &thisv));
JitSpew(JitSpew_BaselineBailouts, " Is function!");
JitSpew(JitSpew_BaselineBailouts, " thisv=%016llx", *((uint64_t *) &thisv));
size_t thisvOffset = builder.framePushed() + IonJSFrameLayout::offsetOfThis();
*builder.valuePointerAtStackOffset(thisvOffset) = thisv;
JS_ASSERT(iter.numAllocations() >= CountArgSlots(script, fun));
IonSpew(IonSpew_BaselineBailouts, " frame slots %u, nargs %u, nfixed %u",
JitSpew(JitSpew_BaselineBailouts, " frame slots %u, nargs %u, nfixed %u",
iter.numAllocations(), fun->nargs(), script->nfixed());
if (!callerPC) {
@ -668,7 +668,7 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
for (uint32_t i = 0; i < fun->nargs(); i++) {
Value arg = iter.read();
IonSpew(IonSpew_BaselineBailouts, " arg %d = %016llx",
JitSpew(JitSpew_BaselineBailouts, " arg %d = %016llx",
(int) i, *((uint64_t *) &arg));
if (callerPC) {
size_t argOffset = builder.framePushed() + IonJSFrameLayout::offsetOfActualArg(i);
@ -710,7 +710,7 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
JS_ASSERT(exprStackSlots >= inlined_args);
pushedSlots = exprStackSlots - inlined_args;
IonSpew(IonSpew_BaselineBailouts,
JitSpew(JitSpew_BaselineBailouts,
" pushing %u expression stack slots before fixup",
pushedSlots);
for (uint32_t i = 0; i < pushedSlots; i++) {
@ -725,7 +725,7 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
// js_fun_call was actually called. This means transforming the stack
// from |target, this, args| to |js_fun_call, target, this, args|
// The js_fun_call is never read, so just pushing undefined now.
IonSpew(IonSpew_BaselineBailouts, " pushing undefined to fixup funcall");
JitSpew(JitSpew_BaselineBailouts, " pushing undefined to fixup funcall");
if (!builder.writeValue(UndefinedValue(), "StackValue"))
return false;
}
@ -743,7 +743,7 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
// Since the information is never read, we can just push undefined
// for all values.
if (op == JSOP_FUNAPPLY) {
IonSpew(IonSpew_BaselineBailouts, " pushing 4x undefined to fixup funapply");
JitSpew(JitSpew_BaselineBailouts, " pushing 4x undefined to fixup funapply");
if (!builder.writeValue(UndefinedValue(), "StackValue"))
return false;
if (!builder.writeValue(UndefinedValue(), "StackValue"))
@ -768,7 +768,7 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
// its arguments. Stash the initial argument on the stack, to be
// later retrieved by the SetProp_Fallback stub.
Value initialArg = savedCallerArgs[inlined_args - 1];
IonSpew(IonSpew_BaselineBailouts, " pushing setter's initial argument");
JitSpew(JitSpew_BaselineBailouts, " pushing setter's initial argument");
if (!builder.writeValue(initialArg, "StackValue"))
return false;
}
@ -776,7 +776,7 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
}
}
IonSpew(IonSpew_BaselineBailouts, " pushing %u expression stack slots",
JitSpew(JitSpew_BaselineBailouts, " pushing %u expression stack slots",
exprStackSlots - pushedSlots);
for (uint32_t i = pushedSlots; i < exprStackSlots; i++) {
Value v;
@ -789,7 +789,7 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
// iterator. Otherwise, we risk using a garbage value.
JS_ASSERT(invalidate);
iter.skip();
IonSpew(IonSpew_BaselineBailouts, " [Return Override]");
JitSpew(JitSpew_BaselineBailouts, " [Return Override]");
v = cx->runtime()->jitRuntime()->takeIonReturnOverride();
} else if (excInfo && excInfo->propagatingIonExceptionForDebugMode()) {
// If we are in the middle of propagating an exception from Ion by
@ -868,10 +868,10 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
}
}
IonSpew(IonSpew_BaselineBailouts, " Resuming %s pc offset %d (op %s) (line %d) of %s:%d",
JitSpew(JitSpew_BaselineBailouts, " Resuming %s pc offset %d (op %s) (line %d) of %s:%d",
resumeAfter ? "after" : "at", (int) pcOff, js_CodeName[op],
PCToLineNumber(script, pc), script->filename(), (int) script->lineno());
IonSpew(IonSpew_BaselineBailouts, " Bailout kind: %s",
JitSpew(JitSpew_BaselineBailouts, " Bailout kind: %s",
BailoutKindString(bailoutKind));
#endif
@ -906,19 +906,19 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
ICEntry &icEntry = baselineScript->icEntryFromPCOffset(pcOff);
ICFallbackStub *fallbackStub = icEntry.firstStub()->getChainFallback();
JS_ASSERT(fallbackStub->isMonitoredFallback());
IonSpew(IonSpew_BaselineBailouts, " [TYPE-MONITOR CHAIN]");
JitSpew(JitSpew_BaselineBailouts, " [TYPE-MONITOR CHAIN]");
ICMonitoredFallbackStub *monFallbackStub = fallbackStub->toMonitoredFallbackStub();
ICStub *firstMonStub = monFallbackStub->fallbackMonitorStub()->firstMonitorStub();
// To enter a monitoring chain, we load the top stack value into R0
IonSpew(IonSpew_BaselineBailouts, " Popping top stack value into R0.");
JitSpew(JitSpew_BaselineBailouts, " Popping top stack value into R0.");
builder.popValueInto(PCMappingSlotInfo::SlotInR0);
// Need to adjust the frameSize for the frame to match the values popped
// into registers.
frameSize -= sizeof(Value);
blFrame->setFrameSize(frameSize);
IonSpew(IonSpew_BaselineBailouts, " Adjusted framesize -= %d: %d",
JitSpew(JitSpew_BaselineBailouts, " Adjusted framesize -= %d: %d",
(int) sizeof(Value), (int) frameSize);
// If resuming into a JSOP_CALL, baseline keeps the arguments on the
@ -933,7 +933,7 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
frameSize += (numCallArgs + 2) * sizeof(Value);
blFrame->setFrameSize(frameSize);
IonSpew(IonSpew_BaselineBailouts, " Adjusted framesize += %d: %d",
JitSpew(JitSpew_BaselineBailouts, " Adjusted framesize += %d: %d",
(int) ((numCallArgs + 2) * sizeof(Value)), (int) frameSize);
}
@ -941,7 +941,7 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
// the monitor stub addr.
builder.setResumeAddr(baselineScript->returnAddressForIC(icEntry));
builder.setMonitorStub(firstMonStub);
IonSpew(IonSpew_BaselineBailouts, " Set resumeAddr=%p monitorStub=%p",
JitSpew(JitSpew_BaselineBailouts, " Set resumeAddr=%p monitorStub=%p",
baselineScript->returnAddressForIC(icEntry), firstMonStub);
} else {
@ -954,13 +954,13 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
PCMappingSlotInfo::SlotLocation loc1, loc2;
if (numUnsynced > 0) {
loc1 = slotInfo.topSlotLocation();
IonSpew(IonSpew_BaselineBailouts, " Popping top stack value into %d.",
JitSpew(JitSpew_BaselineBailouts, " Popping top stack value into %d.",
(int) loc1);
builder.popValueInto(loc1);
}
if (numUnsynced > 1) {
loc2 = slotInfo.nextSlotLocation();
IonSpew(IonSpew_BaselineBailouts, " Popping next stack value into %d.",
JitSpew(JitSpew_BaselineBailouts, " Popping next stack value into %d.",
(int) loc2);
JS_ASSERT_IF(loc1 != PCMappingSlotInfo::SlotIgnore, loc1 != loc2);
builder.popValueInto(loc2);
@ -970,7 +970,7 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
// into registers.
frameSize -= sizeof(Value) * numUnsynced;
blFrame->setFrameSize(frameSize);
IonSpew(IonSpew_BaselineBailouts, " Adjusted framesize -= %d: %d",
JitSpew(JitSpew_BaselineBailouts, " Adjusted framesize -= %d: %d",
int(sizeof(Value) * numUnsynced), int(frameSize));
// If scopeChain is nullptr, then bailout is occurring during argument check.
@ -982,7 +982,7 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
JS_ASSERT(fun);
JS_ASSERT(numUnsynced == 0);
opReturnAddr = baselineScript->prologueEntryAddr();
IonSpew(IonSpew_BaselineBailouts, " Resuming into prologue.");
JitSpew(JitSpew_BaselineBailouts, " Resuming into prologue.");
// If bailing into prologue, HAS_PUSHED_SPS_FRAME should not be set on frame.
blFrame->unsetPushedSPSFrame();
@ -1003,7 +1003,7 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
//
// Only need to handle case 3 here.
if (!caller && bailoutKind != Bailout_ArgumentCheck) {
IonSpew(IonSpew_BaselineBailouts,
JitSpew(JitSpew_BaselineBailouts,
" Popping SPS entry for outermost frame");
cx->runtime()->spsProfiler.exit(script, fun);
}
@ -1012,7 +1012,7 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
opReturnAddr = nativeCodeForPC;
}
builder.setResumeAddr(opReturnAddr);
IonSpew(IonSpew_BaselineBailouts, " Set resumeAddr=%p", opReturnAddr);
JitSpew(JitSpew_BaselineBailouts, " Set resumeAddr=%p", opReturnAddr);
}
if (cx->runtime()->spsProfiler.enabled()) {
@ -1022,7 +1022,7 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
// JSOP_CALL ops but set it to 0 when running other ops. Ion code
// can set the pc to NullPCIndex and this will confuse SPS when
// Baseline calls into the VM at non-CALL ops and re-enters JS.
IonSpew(IonSpew_BaselineBailouts, " Setting PCidx for last frame to 0");
JitSpew(JitSpew_BaselineBailouts, " Setting PCidx for last frame to 0");
cx->runtime()->spsProfiler.updatePC(script, script->code());
}
@ -1086,7 +1086,7 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
// | ReturnAddr |
// +===============+
IonSpew(IonSpew_BaselineBailouts, " [BASELINE-STUB FRAME]");
JitSpew(JitSpew_BaselineBailouts, " [BASELINE-STUB FRAME]");
size_t startOfBaselineStubFrame = builder.framePushed();
@ -1158,9 +1158,9 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
size_t calleeOffset = (builder.framePushed() - endOfBaselineJSFrameStack)
+ ((exprStackSlots - (calleeStackSlot + 1)) * sizeof(Value));
callee = *builder.valuePointerAtStackOffset(calleeOffset);
IonSpew(IonSpew_BaselineBailouts, " CalleeStackSlot=%d", (int) calleeStackSlot);
JitSpew(JitSpew_BaselineBailouts, " CalleeStackSlot=%d", (int) calleeStackSlot);
}
IonSpew(IonSpew_BaselineBailouts, " Callee = %016llx", *((uint64_t *) &callee));
JitSpew(JitSpew_BaselineBailouts, " Callee = %016llx", *((uint64_t *) &callee));
JS_ASSERT(callee.isObject() && callee.toObject().is<JSFunction>());
JSFunction *calleeFun = &callee.toObject().as<JSFunction>();
if (!builder.writePtr(CalleeToToken(calleeFun), "CalleeToken"))
@ -1207,7 +1207,7 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
// | ReturnAddr |
// +===============+
IonSpew(IonSpew_BaselineBailouts, " [RECTIFIER FRAME]");
JitSpew(JitSpew_BaselineBailouts, " [RECTIFIER FRAME]");
size_t startOfRectifierFrame = builder.framePushed();
@ -1228,7 +1228,7 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
return false;
BufferPointer<uint8_t> stubArgsEnd =
builder.pointerAtStackOffset<uint8_t>(builder.framePushed() - endOfBaselineStubArgs);
IonSpew(IonSpew_BaselineBailouts, " MemCpy from %p", stubArgsEnd.get());
JitSpew(JitSpew_BaselineBailouts, " MemCpy from %p", stubArgsEnd.get());
memcpy(builder.pointerAtStackOffset<uint8_t>(0).get(), stubArgsEnd.get(),
(actualArgc + 1) * sizeof(Value));
@ -1310,7 +1310,7 @@ jit::BailoutIonToBaseline(JSContext *cx, JitActivation *activation, IonBailoutIt
// | ||||| |
// +---------------+
IonSpew(IonSpew_BaselineBailouts, "Bailing to baseline %s:%u (IonScript=%p) (FrameType=%d)",
JitSpew(JitSpew_BaselineBailouts, "Bailing to baseline %s:%u (IonScript=%p) (FrameType=%d)",
iter.script()->filename(), iter.script()->lineno(), (void *) iter.ionScript(),
(int) prevFrameType);
@ -1321,16 +1321,16 @@ jit::BailoutIonToBaseline(JSContext *cx, JitActivation *activation, IonBailoutIt
propagatingExceptionForDebugMode = excInfo->propagatingIonExceptionForDebugMode();
if (catchingException)
IonSpew(IonSpew_BaselineBailouts, "Resuming in catch or finally block");
JitSpew(JitSpew_BaselineBailouts, "Resuming in catch or finally block");
if (propagatingExceptionForDebugMode)
IonSpew(IonSpew_BaselineBailouts, "Resuming in-place for debug mode");
JitSpew(JitSpew_BaselineBailouts, "Resuming in-place for debug mode");
} else {
catchingException = false;
propagatingExceptionForDebugMode = false;
}
IonSpew(IonSpew_BaselineBailouts, " Reading from snapshot offset %u size %u",
JitSpew(JitSpew_BaselineBailouts, " Reading from snapshot offset %u size %u",
iter.snapshotOffset(), iter.ionScript()->snapshotsListSize());
if (!excInfo)
@ -1341,7 +1341,7 @@ jit::BailoutIonToBaseline(JSContext *cx, JitActivation *activation, IonBailoutIt
BaselineStackBuilder builder(iter, 1024);
if (!builder.init())
return BAILOUT_RETURN_FATAL_ERROR;
IonSpew(IonSpew_BaselineBailouts, " Incoming frame ptr = %p", builder.startFrame());
JitSpew(JitSpew_BaselineBailouts, " Incoming frame ptr = %p", builder.startFrame());
AutoValueVector instructionResults(cx);
SnapshotIterator snapIter(iter);
@ -1356,18 +1356,18 @@ jit::BailoutIonToBaseline(JSContext *cx, JitActivation *activation, IonBailoutIt
RootedFunction callee(cx, iter.maybeCallee());
RootedScript scr(cx, iter.script());
if (callee) {
IonSpew(IonSpew_BaselineBailouts, " Callee function (%s:%u)",
JitSpew(JitSpew_BaselineBailouts, " Callee function (%s:%u)",
scr->filename(), scr->lineno());
} else {
IonSpew(IonSpew_BaselineBailouts, " No callee!");
JitSpew(JitSpew_BaselineBailouts, " No callee!");
}
if (iter.isConstructing())
IonSpew(IonSpew_BaselineBailouts, " Constructing!");
JitSpew(JitSpew_BaselineBailouts, " Constructing!");
else
IonSpew(IonSpew_BaselineBailouts, " Not constructing!");
JitSpew(JitSpew_BaselineBailouts, " Not constructing!");
IonSpew(IonSpew_BaselineBailouts, " Restoring frames:");
JitSpew(JitSpew_BaselineBailouts, " Restoring frames:");
size_t frameNo = 0;
// Reconstruct baseline frames using the builder.
@ -1392,7 +1392,7 @@ jit::BailoutIonToBaseline(JSContext *cx, JitActivation *activation, IonBailoutIt
TraceLogStartEvent(logger, TraceLogger::Baseline);
}
IonSpew(IonSpew_BaselineBailouts, " FrameNo %d", frameNo);
JitSpew(JitSpew_BaselineBailouts, " FrameNo %d", frameNo);
// If we are bailing out to a catch or finally block in this frame,
// pass excInfo to InitFromBailout and don't unpack any other frames.
@ -1437,7 +1437,7 @@ jit::BailoutIonToBaseline(JSContext *cx, JitActivation *activation, IonBailoutIt
snapIter.nextInstruction();
}
IonSpew(IonSpew_BaselineBailouts, " Done restoring frames");
JitSpew(JitSpew_BaselineBailouts, " Done restoring frames");
// If there were multiple inline frames unpacked, then the current top SPS frame
// is for the outermost caller, and has an uninitialized PC. Initialize it now.
@ -1463,7 +1463,7 @@ jit::BailoutIonToBaseline(JSContext *cx, JitActivation *activation, IonBailoutIt
JS_CHECK_RECURSION_WITH_SP_DONT_REPORT(cx, newsp, overRecursed = true);
#endif
if (overRecursed) {
IonSpew(IonSpew_BaselineBailouts, " Overrecursion check failed!");
JitSpew(JitSpew_BaselineBailouts, " Overrecursion check failed!");
return BAILOUT_RETURN_OVERRECURSED;
}
@ -1478,7 +1478,7 @@ jit::BailoutIonToBaseline(JSContext *cx, JitActivation *activation, IonBailoutIt
static bool
HandleBoundsCheckFailure(JSContext *cx, HandleScript outerScript, HandleScript innerScript)
{
IonSpew(IonSpew_Bailouts, "Bounds check failure %s:%d, inlined into %s:%d",
JitSpew(JitSpew_Bailouts, "Bounds check failure %s:%d, inlined into %s:%d",
innerScript->filename(), innerScript->lineno(),
outerScript->filename(), outerScript->lineno());
@ -1489,14 +1489,14 @@ HandleBoundsCheckFailure(JSContext *cx, HandleScript outerScript, HandleScript i
// inner and outer scripts, instead of just the outer one.
if (!outerScript->failedBoundsCheck())
outerScript->setFailedBoundsCheck();
IonSpew(IonSpew_BaselineBailouts, "Invalidating due to bounds check failure");
JitSpew(JitSpew_BaselineBailouts, "Invalidating due to bounds check failure");
return Invalidate(cx, outerScript);
}
static bool
HandleShapeGuardFailure(JSContext *cx, HandleScript outerScript, HandleScript innerScript)
{
IonSpew(IonSpew_Bailouts, "Shape guard failure %s:%d, inlined into %s:%d",
JitSpew(JitSpew_Bailouts, "Shape guard failure %s:%d, inlined into %s:%d",
innerScript->filename(), innerScript->lineno(),
outerScript->filename(), outerScript->lineno());
@ -1506,20 +1506,20 @@ HandleShapeGuardFailure(JSContext *cx, HandleScript outerScript, HandleScript in
// the flag on innerScript as opposed to outerScript, and maybe invalidating both
// inner and outer scripts, instead of just the outer one.
outerScript->setFailedShapeGuard();
IonSpew(IonSpew_BaselineBailouts, "Invalidating due to shape guard failure");
JitSpew(JitSpew_BaselineBailouts, "Invalidating due to shape guard failure");
return Invalidate(cx, outerScript);
}
static bool
HandleBaselineInfoBailout(JSContext *cx, JSScript *outerScript, JSScript *innerScript)
{
IonSpew(IonSpew_Bailouts, "Baseline info failure %s:%d, inlined into %s:%d",
JitSpew(JitSpew_Bailouts, "Baseline info failure %s:%d, inlined into %s:%d",
innerScript->filename(), innerScript->lineno(),
outerScript->filename(), outerScript->lineno());
JS_ASSERT(!outerScript->ionScript()->invalidated());
IonSpew(IonSpew_BaselineBailouts, "Invalidating due to invalid baseline info");
JitSpew(JitSpew_BaselineBailouts, "Invalidating due to invalid baseline info");
return Invalidate(cx, outerScript);
}
@ -1546,7 +1546,7 @@ CopyFromRematerializedFrame(JSContext *cx, JitActivation *act, uint8_t *fp, size
for (size_t i = 0; i < frame->script()->nfixed(); i++)
*frame->valueSlot(i) = rematFrame->locals()[i];
IonSpew(IonSpew_BaselineBailouts,
JitSpew(JitSpew_BaselineBailouts,
" Copied from rematerialized frame at (%p,%u)",
fp, inlineDepth);
@ -1564,13 +1564,13 @@ jit::FinishBailoutToBaseline(BaselineBailoutInfo *bailoutInfo)
JSContext *cx = GetJSContextFromJitCode();
js::gc::AutoSuppressGC suppressGC(cx);
IonSpew(IonSpew_BaselineBailouts, " Done restoring frames");
JitSpew(JitSpew_BaselineBailouts, " Done restoring frames");
// Check that we can get the current script's PC.
#ifdef DEBUG
jsbytecode *pc;
cx->currentScript(&pc);
IonSpew(IonSpew_BaselineBailouts, " Got pc=%p", pc);
JitSpew(JitSpew_BaselineBailouts, " Got pc=%p", pc);
#endif
uint32_t numFrames = bailoutInfo->numFrames;
@ -1667,7 +1667,7 @@ jit::FinishBailoutToBaseline(BaselineBailoutInfo *bailoutInfo)
act->removeRematerializedFrame(outerFp);
}
IonSpew(IonSpew_BaselineBailouts,
JitSpew(JitSpew_BaselineBailouts,
" Restored outerScript=(%s:%u,%u) innerScript=(%s:%u,%u) (bailoutKind=%u)",
outerScript->filename(), outerScript->lineno(), outerScript->getUseCount(),
innerScript->filename(), innerScript->lineno(), innerScript->getUseCount(),

View File

@ -12,8 +12,8 @@
#include "jit/FixedList.h"
#include "jit/IonAnalysis.h"
#include "jit/IonLinker.h"
#include "jit/IonSpewer.h"
#include "jit/JitcodeMap.h"
#include "jit/JitSpewer.h"
#ifdef JS_ION_PERF
# include "jit/PerfSpewer.h"
#endif
@ -71,10 +71,10 @@ BaselineCompiler::addPCMappingEntry(bool addIndexEntry)
MethodStatus
BaselineCompiler::compile()
{
IonSpew(IonSpew_BaselineScripts, "Baseline compiling script %s:%d (%p)",
JitSpew(JitSpew_BaselineScripts, "Baseline compiling script %s:%d (%p)",
script->filename(), script->lineno(), script);
IonSpew(IonSpew_Codegen, "# Emitting baseline code for script %s:%d",
JitSpew(JitSpew_Codegen, "# Emitting baseline code for script %s:%d",
script->filename(), script->lineno());
TraceLogger *logger = TraceLoggerForMainThread(cx->runtime());
@ -192,7 +192,7 @@ BaselineCompiler::compile()
baselineScript->setMethod(code);
baselineScript->setTemplateScope(templateScope);
IonSpew(IonSpew_BaselineScripts, "Created BaselineScript %p (raw %p) for %s:%d",
JitSpew(JitSpew_BaselineScripts, "Created BaselineScript %p (raw %p) for %s:%d",
(void *) baselineScript, (void *) code->raw(),
script->filename(), script->lineno());
@ -247,7 +247,7 @@ BaselineCompiler::compile()
// Register a native => bytecode mapping entry for this script if needed.
if (cx->runtime()->jitRuntime()->isNativeToBytecodeMapEnabled(cx->runtime())) {
IonSpew(IonSpew_Profiling, "Added JitcodeGlobalEntry for baseline script %s:%d (%p)",
JitSpew(JitSpew_Profiling, "Added JitcodeGlobalEntry for baseline script %s:%d (%p)",
script->filename(), script->lineno(), baselineScript);
JitcodeGlobalEntry::BaselineEntry entry;
entry.init(code->raw(), code->raw() + code->instructionsSize(), script);
@ -789,7 +789,7 @@ BaselineCompiler::emitBody()
while (true) {
JSOp op = JSOp(*pc);
IonSpew(IonSpew_BaselineOp, "Compiling op @ %d: %s",
JitSpew(JitSpew_BaselineOp, "Compiling op @ %d: %s",
int(script->pcToOffset(pc)), js_CodeName[op]);
BytecodeInfo *info = analysis_.maybeInfo(pc);
@ -840,7 +840,7 @@ BaselineCompiler::emitBody()
switch (op) {
default:
IonSpew(IonSpew_BaselineAbort, "Unhandled op: %s", js_CodeName[op]);
JitSpew(JitSpew_BaselineAbort, "Unhandled op: %s", js_CodeName[op]);
return Method_CantCompile;
#define EMIT_OP(OP) \

View File

@ -261,7 +261,7 @@ static void
SpewPatchBaselineFrame(uint8_t *oldReturnAddress, uint8_t *newReturnAddress,
JSScript *script, ICEntry::Kind frameKind, jsbytecode *pc)
{
IonSpew(IonSpew_BaselineDebugModeOSR,
JitSpew(JitSpew_BaselineDebugModeOSR,
"Patch return %p -> %p on BaselineJS frame (%s:%d) from %s at %s",
oldReturnAddress, newReturnAddress, script->filename(), script->lineno(),
ICEntryKindToString(frameKind), js_CodeName[(JSOp)*pc]);
@ -270,7 +270,7 @@ SpewPatchBaselineFrame(uint8_t *oldReturnAddress, uint8_t *newReturnAddress,
static void
SpewPatchStubFrame(ICStub *oldStub, ICStub *newStub)
{
IonSpew(IonSpew_BaselineDebugModeOSR,
JitSpew(JitSpew_BaselineDebugModeOSR,
"Patch stub %p -> %p on BaselineStub frame (%s)",
oldStub, newStub, ICStub::KindString(newStub->kind()));
}
@ -501,7 +501,7 @@ RecompileBaselineScriptForDebugMode(JSContext *cx, JSScript *script)
if (oldBaselineScript->debugMode() == expectedDebugMode)
return true;
IonSpew(IonSpew_BaselineDebugModeOSR, "Recompiling (%s:%d) for debug mode %s",
JitSpew(JitSpew_BaselineDebugModeOSR, "Recompiling (%s:%d) for debug mode %s",
script->filename(), script->lineno(), expectedDebugMode ? "ON" : "OFF");
CancelOffThreadIonCompile(cx->compartment(), script);

View File

@ -17,7 +17,7 @@
#include "jit/BaselineHelpers.h"
#include "jit/BaselineJIT.h"
#include "jit/IonLinker.h"
#include "jit/IonSpewer.h"
#include "jit/JitSpewer.h"
#include "jit/Lowering.h"
#ifdef JS_ION_PERF
# include "jit/PerfSpewer.h"
@ -42,7 +42,7 @@ namespace jit {
void
FallbackICSpew(JSContext *cx, ICFallbackStub *stub, const char *fmt, ...)
{
if (IonSpewEnabled(IonSpew_BaselineICFallback)) {
if (JitSpewEnabled(JitSpew_BaselineICFallback)) {
RootedScript script(cx, GetTopIonJSScript(cx));
jsbytecode *pc = stub->icEntry()->pc(script);
@ -52,7 +52,7 @@ FallbackICSpew(JSContext *cx, ICFallbackStub *stub, const char *fmt, ...)
vsnprintf(fmtbuf, 100, fmt, args);
va_end(args);
IonSpew(IonSpew_BaselineICFallback,
JitSpew(JitSpew_BaselineICFallback,
"Fallback hit for (%s:%d) (pc=%d,line=%d,uses=%d,stubs=%d): %s",
script->filename(),
script->lineno(),
@ -67,7 +67,7 @@ FallbackICSpew(JSContext *cx, ICFallbackStub *stub, const char *fmt, ...)
void
TypeFallbackICSpew(JSContext *cx, ICTypeMonitor_Fallback *stub, const char *fmt, ...)
{
if (IonSpewEnabled(IonSpew_BaselineICFallback)) {
if (JitSpewEnabled(JitSpew_BaselineICFallback)) {
RootedScript script(cx, GetTopIonJSScript(cx));
jsbytecode *pc = stub->icEntry()->pc(script);
@ -77,7 +77,7 @@ TypeFallbackICSpew(JSContext *cx, ICTypeMonitor_Fallback *stub, const char *fmt,
vsnprintf(fmtbuf, 100, fmt, args);
va_end(args);
IonSpew(IonSpew_BaselineICFallback,
JitSpew(JitSpew_BaselineICFallback,
"Type monitor fallback hit for (%s:%d) (pc=%d,line=%d,uses=%d,stubs=%d): %s",
script->filename(),
script->lineno(),
@ -806,26 +806,26 @@ EnsureCanEnterIon(JSContext *cx, ICUseCount_Fallback *stub, BaselineFrame *frame
MethodStatus stat;
if (isLoopEntry) {
JS_ASSERT(LoopEntryCanIonOsr(pc));
IonSpew(IonSpew_BaselineOSR, " Compile at loop entry!");
JitSpew(JitSpew_BaselineOSR, " Compile at loop entry!");
stat = CanEnterAtBranch(cx, script, frame, pc, isConstructing);
} else if (frame->isFunctionFrame()) {
IonSpew(IonSpew_BaselineOSR, " Compile function from top for later entry!");
JitSpew(JitSpew_BaselineOSR, " Compile function from top for later entry!");
stat = CompileFunctionForBaseline(cx, script, frame, isConstructing);
} else {
return true;
}
if (stat == Method_Error) {
IonSpew(IonSpew_BaselineOSR, " Compile with Ion errored!");
JitSpew(JitSpew_BaselineOSR, " Compile with Ion errored!");
return false;
}
if (stat == Method_CantCompile)
IonSpew(IonSpew_BaselineOSR, " Can't compile with Ion!");
JitSpew(JitSpew_BaselineOSR, " Can't compile with Ion!");
else if (stat == Method_Skipped)
IonSpew(IonSpew_BaselineOSR, " Skipped compile with Ion!");
JitSpew(JitSpew_BaselineOSR, " Skipped compile with Ion!");
else if (stat == Method_Compiled)
IonSpew(IonSpew_BaselineOSR, " Compiled with Ion!");
JitSpew(JitSpew_BaselineOSR, " Compiled with Ion!");
else
MOZ_CRASH("Invalid MethodStatus!");
@ -835,7 +835,7 @@ EnsureCanEnterIon(JSContext *cx, ICUseCount_Fallback *stub, BaselineFrame *frame
// entirely, instead of resetting it.
bool bailoutExpected = script->hasIonScript() && script->ionScript()->bailoutExpected();
if (stat == Method_CantCompile || bailoutExpected) {
IonSpew(IonSpew_BaselineOSR, " Reset UseCount cantCompile=%s bailoutExpected=%s!",
JitSpew(JitSpew_BaselineOSR, " Reset UseCount cantCompile=%s bailoutExpected=%s!",
stat == Method_CantCompile ? "yes" : "no",
bailoutExpected ? "yes" : "no");
script->resetUseCount();
@ -851,11 +851,11 @@ EnsureCanEnterIon(JSContext *cx, ICUseCount_Fallback *stub, BaselineFrame *frame
// If the baseline frame's SPS handling doesn't match up with the Ion code's SPS
// handling, don't OSR.
if (frame->hasPushedSPSFrame() != ion->hasSPSInstrumentation()) {
IonSpew(IonSpew_BaselineOSR, " OSR crosses SPS handling boundaries, skipping!");
JitSpew(JitSpew_BaselineOSR, " OSR crosses SPS handling boundaries, skipping!");
return true;
}
IonSpew(IonSpew_BaselineOSR, " OSR possible!");
JitSpew(JitSpew_BaselineOSR, " OSR possible!");
*jitcodePtr = ion->method()->raw() + ion->osrEntryOffset();
}
@ -927,8 +927,8 @@ PrepareOsrTempData(JSContext *cx, ICUseCount_Fallback *stub, BaselineFrame *fram
memcpy(frameStart, (uint8_t *)frame - numLocalsAndStackVals * sizeof(Value), frameSpace);
IonSpew(IonSpew_BaselineOSR, "Allocated IonOsrTempData at %p", (void *) info);
IonSpew(IonSpew_BaselineOSR, "Jitcode is %p", info->jitcode);
JitSpew(JitSpew_BaselineOSR, "Allocated IonOsrTempData at %p", (void *) info);
JitSpew(JitSpew_BaselineOSR, "Jitcode is %p", info->jitcode);
// All done.
return info;
@ -966,7 +966,7 @@ DoUseCountFallback(JSContext *cx, ICUseCount_Fallback *stub, BaselineFrame *fram
// If Ion script exists, but PC is not at a loop entry, then Ion will be entered for
// this script at an appropriate LOOPENTRY or the next time this function is called.
if (script->hasIonScript() && !isLoopEntry) {
IonSpew(IonSpew_BaselineOSR, "IonScript exists, but not at loop entry!");
JitSpew(JitSpew_BaselineOSR, "IonScript exists, but not at loop entry!");
// TODO: ASSERT that a ion-script-already-exists checker stub doesn't exist.
// TODO: Clear all optimized stubs.
// TODO: Add a ion-script-already-exists checker stub.
@ -974,7 +974,7 @@ DoUseCountFallback(JSContext *cx, ICUseCount_Fallback *stub, BaselineFrame *fram
}
// Ensure that Ion-compiled code is available.
IonSpew(IonSpew_BaselineOSR,
JitSpew(JitSpew_BaselineOSR,
"UseCount for %s:%d reached %d at pc %p, trying to switch to Ion!",
script->filename(), script->lineno(), (int) script->getUseCount(), (void *) pc);
void *jitcode = nullptr;
@ -987,7 +987,7 @@ DoUseCountFallback(JSContext *cx, ICUseCount_Fallback *stub, BaselineFrame *fram
return true;
// Prepare the temporary heap copy of the fake InterpreterFrame and actual args list.
IonSpew(IonSpew_BaselineOSR, "Got jitcode. Preparing for OSR into ion.");
JitSpew(JitSpew_BaselineOSR, "Got jitcode. Preparing for OSR into ion.");
IonOsrTempData *info = PrepareOsrTempData(cx, stub, frame, script, pc, jitcode);
if (!info)
return false;
@ -1105,7 +1105,7 @@ DoProfilerFallback(JSContext *cx, BaselineFrame *frame, ICProfiler_Fallback *stu
if (string == nullptr)
return false;
IonSpew(IonSpew_BaselineIC, " Generating Profiler_PushFunction stub for %s:%d",
JitSpew(JitSpew_BaselineIC, " Generating Profiler_PushFunction stub for %s:%d",
script->filename(), script->lineno());
// Create a new optimized stub.
@ -1203,7 +1203,7 @@ ICTypeMonitor_Fallback::addMonitorStubForValue(JSContext *cx, JSScript *script,
return false;
}
IonSpew(IonSpew_BaselineIC, " %s TypeMonitor stub %p for primitive type %d",
JitSpew(JitSpew_BaselineIC, " %s TypeMonitor stub %p for primitive type %d",
existingStub ? "Modified existing" : "Created new", stub, type);
if (!existingStub) {
@ -1230,7 +1230,7 @@ ICTypeMonitor_Fallback::addMonitorStubForValue(JSContext *cx, JSScript *script,
return false;
}
IonSpew(IonSpew_BaselineIC, " Added TypeMonitor stub %p for singleton %p",
JitSpew(JitSpew_BaselineIC, " Added TypeMonitor stub %p for singleton %p",
stub, obj.get());
addOptimizedMonitorStub(stub);
@ -1254,7 +1254,7 @@ ICTypeMonitor_Fallback::addMonitorStubForValue(JSContext *cx, JSScript *script,
return false;
}
IonSpew(IonSpew_BaselineIC, " Added TypeMonitor stub %p for TypeObject %p",
JitSpew(JitSpew_BaselineIC, " Added TypeMonitor stub %p for TypeObject %p",
stub, type.get());
addOptimizedMonitorStub(stub);
@ -1460,7 +1460,7 @@ ICUpdatedStub::addUpdateStubForValue(JSContext *cx, HandleScript script, HandleO
addOptimizedUpdateStub(stub);
}
IonSpew(IonSpew_BaselineIC, " %s TypeUpdate stub %p for primitive type %d",
JitSpew(JitSpew_BaselineIC, " %s TypeUpdate stub %p for primitive type %d",
existingStub ? "Modified existing" : "Created new", stub, type);
} else if (val.toObject().hasSingletonType()) {
@ -1480,7 +1480,7 @@ ICUpdatedStub::addUpdateStubForValue(JSContext *cx, HandleScript script, HandleO
if (!stub)
return false;
IonSpew(IonSpew_BaselineIC, " Added TypeUpdate stub %p for singleton %p", stub, obj.get());
JitSpew(JitSpew_BaselineIC, " Added TypeUpdate stub %p for singleton %p", stub, obj.get());
addOptimizedUpdateStub(stub);
@ -1501,7 +1501,7 @@ ICUpdatedStub::addUpdateStubForValue(JSContext *cx, HandleScript script, HandleO
if (!stub)
return false;
IonSpew(IonSpew_BaselineIC, " Added TypeUpdate stub %p for TypeObject %p",
JitSpew(JitSpew_BaselineIC, " Added TypeUpdate stub %p for TypeObject %p",
stub, type.get());
addOptimizedUpdateStub(stub);
@ -1859,7 +1859,7 @@ DoCompareFallback(JSContext *cx, BaselineFrame *frame, ICCompare_Fallback *stub_
// Try to generate new stubs.
if (lhs.isInt32() && rhs.isInt32()) {
IonSpew(IonSpew_BaselineIC, " Generating %s(Int32, Int32) stub", js_CodeName[op]);
JitSpew(JitSpew_BaselineIC, " Generating %s(Int32, Int32) stub", js_CodeName[op]);
ICCompare_Int32::Compiler compiler(cx, op);
ICStub *int32Stub = compiler.getStub(compiler.getStubSpace(script));
if (!int32Stub)
@ -1873,7 +1873,7 @@ DoCompareFallback(JSContext *cx, BaselineFrame *frame, ICCompare_Fallback *stub_
return true;
if (lhs.isNumber() && rhs.isNumber()) {
IonSpew(IonSpew_BaselineIC, " Generating %s(Number, Number) stub", js_CodeName[op]);
JitSpew(JitSpew_BaselineIC, " Generating %s(Number, Number) stub", js_CodeName[op]);
// Unlink int32 stubs, it's faster to always use the double stub.
stub->unlinkStubsWithKind(cx, ICStub::Compare_Int32);
@ -1890,7 +1890,7 @@ DoCompareFallback(JSContext *cx, BaselineFrame *frame, ICCompare_Fallback *stub_
if ((lhs.isNumber() && rhs.isUndefined()) ||
(lhs.isUndefined() && rhs.isNumber()))
{
IonSpew(IonSpew_BaselineIC, " Generating %s(%s, %s) stub", js_CodeName[op],
JitSpew(JitSpew_BaselineIC, " Generating %s(%s, %s) stub", js_CodeName[op],
rhs.isUndefined() ? "Number" : "Undefined",
rhs.isUndefined() ? "Undefined" : "Number");
ICCompare_NumberWithUndefined::Compiler compiler(cx, op, lhs.isUndefined());
@ -1903,7 +1903,7 @@ DoCompareFallback(JSContext *cx, BaselineFrame *frame, ICCompare_Fallback *stub_
}
if (lhs.isBoolean() && rhs.isBoolean()) {
IonSpew(IonSpew_BaselineIC, " Generating %s(Boolean, Boolean) stub", js_CodeName[op]);
JitSpew(JitSpew_BaselineIC, " Generating %s(Boolean, Boolean) stub", js_CodeName[op]);
ICCompare_Boolean::Compiler compiler(cx, op);
ICStub *booleanStub = compiler.getStub(compiler.getStubSpace(script));
if (!booleanStub)
@ -1914,7 +1914,7 @@ DoCompareFallback(JSContext *cx, BaselineFrame *frame, ICCompare_Fallback *stub_
}
if ((lhs.isBoolean() && rhs.isInt32()) || (lhs.isInt32() && rhs.isBoolean())) {
IonSpew(IonSpew_BaselineIC, " Generating %s(%s, %s) stub", js_CodeName[op],
JitSpew(JitSpew_BaselineIC, " Generating %s(%s, %s) stub", js_CodeName[op],
rhs.isInt32() ? "Boolean" : "Int32",
rhs.isInt32() ? "Int32" : "Boolean");
ICCompare_Int32WithBoolean::Compiler compiler(cx, op, lhs.isInt32());
@ -1928,7 +1928,7 @@ DoCompareFallback(JSContext *cx, BaselineFrame *frame, ICCompare_Fallback *stub_
if (IsEqualityOp(op)) {
if (lhs.isString() && rhs.isString() && !stub->hasStub(ICStub::Compare_String)) {
IonSpew(IonSpew_BaselineIC, " Generating %s(String, String) stub", js_CodeName[op]);
JitSpew(JitSpew_BaselineIC, " Generating %s(String, String) stub", js_CodeName[op]);
ICCompare_String::Compiler compiler(cx, op);
ICStub *stringStub = compiler.getStub(compiler.getStubSpace(script));
if (!stringStub)
@ -1940,7 +1940,7 @@ DoCompareFallback(JSContext *cx, BaselineFrame *frame, ICCompare_Fallback *stub_
if (lhs.isObject() && rhs.isObject()) {
JS_ASSERT(!stub->hasStub(ICStub::Compare_Object));
IonSpew(IonSpew_BaselineIC, " Generating %s(Object, Object) stub", js_CodeName[op]);
JitSpew(JitSpew_BaselineIC, " Generating %s(Object, Object) stub", js_CodeName[op]);
ICCompare_Object::Compiler compiler(cx, op);
ICStub *objectStub = compiler.getStub(compiler.getStubSpace(script));
if (!objectStub)
@ -1954,7 +1954,7 @@ DoCompareFallback(JSContext *cx, BaselineFrame *frame, ICCompare_Fallback *stub_
(rhs.isObject() || rhs.isNull() || rhs.isUndefined()) &&
!stub->hasStub(ICStub::Compare_ObjectWithUndefined))
{
IonSpew(IonSpew_BaselineIC, " Generating %s(Obj/Null/Undef, Obj/Null/Undef) stub",
JitSpew(JitSpew_BaselineIC, " Generating %s(Obj/Null/Undef, Obj/Null/Undef) stub",
js_CodeName[op]);
bool lhsIsUndefined = lhs.isNull() || lhs.isUndefined();
bool compareWithNull = lhs.isNull() || rhs.isNull();
@ -2254,7 +2254,7 @@ DoToBoolFallback(JSContext *cx, BaselineFrame *frame, ICToBool_Fallback *stub, H
// Try to generate new stubs.
if (arg.isInt32()) {
IonSpew(IonSpew_BaselineIC, " Generating ToBool(Int32) stub.");
JitSpew(JitSpew_BaselineIC, " Generating ToBool(Int32) stub.");
ICToBool_Int32::Compiler compiler(cx);
ICStub *int32Stub = compiler.getStub(compiler.getStubSpace(script));
if (!int32Stub)
@ -2265,7 +2265,7 @@ DoToBoolFallback(JSContext *cx, BaselineFrame *frame, ICToBool_Fallback *stub, H
}
if (arg.isDouble() && cx->runtime()->jitSupportsFloatingPoint) {
IonSpew(IonSpew_BaselineIC, " Generating ToBool(Double) stub.");
JitSpew(JitSpew_BaselineIC, " Generating ToBool(Double) stub.");
ICToBool_Double::Compiler compiler(cx);
ICStub *doubleStub = compiler.getStub(compiler.getStubSpace(script));
if (!doubleStub)
@ -2276,7 +2276,7 @@ DoToBoolFallback(JSContext *cx, BaselineFrame *frame, ICToBool_Fallback *stub, H
}
if (arg.isString()) {
IonSpew(IonSpew_BaselineIC, " Generating ToBool(String) stub");
JitSpew(JitSpew_BaselineIC, " Generating ToBool(String) stub");
ICToBool_String::Compiler compiler(cx);
ICStub *stringStub = compiler.getStub(compiler.getStubSpace(script));
if (!stringStub)
@ -2297,7 +2297,7 @@ DoToBoolFallback(JSContext *cx, BaselineFrame *frame, ICToBool_Fallback *stub, H
}
if (arg.isObject()) {
IonSpew(IonSpew_BaselineIC, " Generating ToBool(Object) stub.");
JitSpew(JitSpew_BaselineIC, " Generating ToBool(Object) stub.");
ICToBool_Object::Compiler compiler(cx);
ICStub *objStub = compiler.getStub(compiler.getStubSpace(script));
if (!objStub)
@ -2605,7 +2605,7 @@ DoBinaryArithFallback(JSContext *cx, BaselineFrame *frame, ICBinaryArith_Fallbac
// Handle string concat.
if (op == JSOP_ADD) {
if (lhs.isString() && rhs.isString()) {
IonSpew(IonSpew_BaselineIC, " Generating %s(String, String) stub", js_CodeName[op]);
JitSpew(JitSpew_BaselineIC, " Generating %s(String, String) stub", js_CodeName[op]);
JS_ASSERT(ret.isString());
ICBinaryArith_StringConcat::Compiler compiler(cx);
ICStub *strcatStub = compiler.getStub(compiler.getStubSpace(script));
@ -2616,7 +2616,7 @@ DoBinaryArithFallback(JSContext *cx, BaselineFrame *frame, ICBinaryArith_Fallbac
}
if ((lhs.isString() && rhs.isObject()) || (lhs.isObject() && rhs.isString())) {
IonSpew(IonSpew_BaselineIC, " Generating %s(%s, %s) stub", js_CodeName[op],
JitSpew(JitSpew_BaselineIC, " Generating %s(%s, %s) stub", js_CodeName[op],
lhs.isString() ? "String" : "Object",
lhs.isString() ? "Object" : "String");
JS_ASSERT(ret.isString());
@ -2634,7 +2634,7 @@ DoBinaryArithFallback(JSContext *cx, BaselineFrame *frame, ICBinaryArith_Fallbac
(op == JSOP_ADD || op == JSOP_SUB || op == JSOP_BITOR || op == JSOP_BITAND ||
op == JSOP_BITXOR))
{
IonSpew(IonSpew_BaselineIC, " Generating %s(%s, %s) stub", js_CodeName[op],
JitSpew(JitSpew_BaselineIC, " Generating %s(%s, %s) stub", js_CodeName[op],
lhs.isBoolean() ? "Boolean" : "Int32", rhs.isBoolean() ? "Boolean" : "Int32");
ICBinaryArith_BooleanWithInt32::Compiler compiler(cx, op, lhs.isBoolean(), rhs.isBoolean());
ICStub *arithStub = compiler.getStub(compiler.getStubSpace(script));
@ -2664,7 +2664,7 @@ DoBinaryArithFallback(JSContext *cx, BaselineFrame *frame, ICBinaryArith_Fallbac
case JSOP_MOD: {
// Unlink int32 stubs, it's faster to always use the double stub.
stub->unlinkStubsWithKind(cx, ICStub::BinaryArith_Int32);
IonSpew(IonSpew_BaselineIC, " Generating %s(Double, Double) stub", js_CodeName[op]);
JitSpew(JitSpew_BaselineIC, " Generating %s(Double, Double) stub", js_CodeName[op]);
ICBinaryArith_Double::Compiler compiler(cx, op);
ICStub *doubleStub = compiler.getStub(compiler.getStubSpace(script));
@ -2682,7 +2682,7 @@ DoBinaryArithFallback(JSContext *cx, BaselineFrame *frame, ICBinaryArith_Fallbac
bool allowDouble = ret.isDouble();
if (allowDouble)
stub->unlinkStubsWithKind(cx, ICStub::BinaryArith_Int32);
IonSpew(IonSpew_BaselineIC, " Generating %s(Int32, Int32%s) stub", js_CodeName[op],
JitSpew(JitSpew_BaselineIC, " Generating %s(Int32, Int32%s) stub", js_CodeName[op],
allowDouble ? " => Double" : "");
ICBinaryArith_Int32::Compiler compilerInt32(cx, op, allowDouble);
ICStub *int32Stub = compilerInt32.getStub(compilerInt32.getStubSpace(script));
@ -2700,7 +2700,7 @@ DoBinaryArithFallback(JSContext *cx, BaselineFrame *frame, ICBinaryArith_Fallbac
case JSOP_BITOR:
case JSOP_BITXOR:
case JSOP_BITAND: {
IonSpew(IonSpew_BaselineIC, " Generating %s(%s, %s) stub", js_CodeName[op],
JitSpew(JitSpew_BaselineIC, " Generating %s(%s, %s) stub", js_CodeName[op],
lhs.isDouble() ? "Double" : "Int32",
lhs.isDouble() ? "Int32" : "Double");
ICBinaryArith_DoubleWithInt32::Compiler compiler(cx, op, lhs.isDouble());
@ -3103,7 +3103,7 @@ DoUnaryArithFallback(JSContext *cx, BaselineFrame *frame, ICUnaryArith_Fallback
}
if (val.isInt32() && res.isInt32()) {
IonSpew(IonSpew_BaselineIC, " Generating %s(Int32 => Int32) stub", js_CodeName[op]);
JitSpew(JitSpew_BaselineIC, " Generating %s(Int32 => Int32) stub", js_CodeName[op]);
ICUnaryArith_Int32::Compiler compiler(cx, op);
ICStub *int32Stub = compiler.getStub(compiler.getStubSpace(script));
if (!int32Stub)
@ -3113,7 +3113,7 @@ DoUnaryArithFallback(JSContext *cx, BaselineFrame *frame, ICUnaryArith_Fallback
}
if (val.isNumber() && res.isNumber() && cx->runtime()->jitSupportsFloatingPoint) {
IonSpew(IonSpew_BaselineIC, " Generating %s(Number => Number) stub", js_CodeName[op]);
JitSpew(JitSpew_BaselineIC, " Generating %s(Number => Number) stub", js_CodeName[op]);
// Unlink int32 stubs, the double stub handles both cases and TI specializes for both.
stub->unlinkStubsWithKind(cx, ICStub::UnaryArith_Int32);
@ -3795,7 +3795,7 @@ static bool TryAttachNativeGetElemStub(JSContext *cx, HandleScript script, jsbyt
ICStub::Kind kind = (obj == holder) ? ICStub::GetElem_NativeSlot
: ICStub::GetElem_NativePrototypeSlot;
IonSpew(IonSpew_BaselineIC, " Generating GetElem(Native %s%s slot) stub "
JitSpew(JitSpew_BaselineIC, " Generating GetElem(Native %s%s slot) stub "
"(obj=%p, shape=%p, holder=%p, holderShape=%p)",
(obj == holder) ? "direct" : "prototype",
needsAtomize ? " atomizing" : "",
@ -3840,7 +3840,7 @@ static bool TryAttachNativeGetElemStub(JSContext *cx, HandleScript script, jsbyt
: ICStub::GetElem_NativePrototypeCallNative;
if (getterIsScripted) {
IonSpew(IonSpew_BaselineIC,
JitSpew(JitSpew_BaselineIC,
" Generating GetElem(Native %s%s call scripted %s:%d) stub "
"(obj=%p, shape=%p, holder=%p, holderShape=%p)",
(obj == holder) ? "direct" : "prototype",
@ -3848,7 +3848,7 @@ static bool TryAttachNativeGetElemStub(JSContext *cx, HandleScript script, jsbyt
getter->nonLazyScript()->filename(), getter->nonLazyScript()->lineno(),
obj.get(), obj->lastProperty(), holder.get(), holder->lastProperty());
} else {
IonSpew(IonSpew_BaselineIC,
JitSpew(JitSpew_BaselineIC,
" Generating GetElem(Native %s%s call native) stub "
"(obj=%p, shape=%p, holder=%p, holderShape=%p)",
(obj == holder) ? "direct" : "prototype",
@ -3893,7 +3893,7 @@ TryAttachGetElemStub(JSContext *cx, JSScript *script, jsbytecode *pc, ICGetElem_
{
// NoSuchMethod handling doesn't apply to string targets.
IonSpew(IonSpew_BaselineIC, " Generating GetElem(String[Int32]) stub");
JitSpew(JitSpew_BaselineIC, " Generating GetElem(String[Int32]) stub");
ICGetElem_String::Compiler compiler(cx);
ICStub *stringStub = compiler.getStub(compiler.getStubSpace(script));
if (!stringStub)
@ -3910,7 +3910,7 @@ TryAttachGetElemStub(JSContext *cx, JSScript *script, jsbytecode *pc, ICGetElem_
// should not have optimized arguments.
JS_ASSERT(!isCallElem);
IonSpew(IonSpew_BaselineIC, " Generating GetElem(MagicArgs[Int32]) stub");
JitSpew(JitSpew_BaselineIC, " Generating GetElem(MagicArgs[Int32]) stub");
ICGetElem_Arguments::Compiler compiler(cx, stub->fallbackMonitorStub()->firstMonitorStub(),
ICGetElem_Arguments::Magic, false);
ICStub *argsStub = compiler.getStub(compiler.getStubSpace(script));
@ -3932,7 +3932,7 @@ TryAttachGetElemStub(JSContext *cx, JSScript *script, jsbytecode *pc, ICGetElem_
if (obj->is<StrictArgumentsObject>())
which = ICGetElem_Arguments::Strict;
if (!ArgumentsGetElemStubExists(stub, which)) {
IonSpew(IonSpew_BaselineIC, " Generating GetElem(ArgsObj[Int32]) stub");
JitSpew(JitSpew_BaselineIC, " Generating GetElem(ArgsObj[Int32]) stub");
ICGetElem_Arguments::Compiler compiler(
cx, stub->fallbackMonitorStub()->firstMonitorStub(), which, isCallElem);
ICStub *argsStub = compiler.getStub(compiler.getStubSpace(script));
@ -3947,7 +3947,7 @@ TryAttachGetElemStub(JSContext *cx, JSScript *script, jsbytecode *pc, ICGetElem_
if (obj->isNative()) {
// Check for NativeObject[int] dense accesses.
if (rhs.isInt32() && rhs.toInt32() >= 0 && !obj->is<TypedArrayObject>()) {
IonSpew(IonSpew_BaselineIC, " Generating GetElem(Native[Int32] dense) stub");
JitSpew(JitSpew_BaselineIC, " Generating GetElem(Native[Int32] dense) stub");
ICGetElem_Dense::Compiler compiler(cx, stub->fallbackMonitorStub()->firstMonitorStub(),
obj->lastProperty(), isCallElem);
ICStub *denseStub = compiler.getStub(compiler.getStubSpace(script));
@ -3984,7 +3984,7 @@ TryAttachGetElemStub(JSContext *cx, JSScript *script, jsbytecode *pc, ICGetElem_
return true;
}
IonSpew(IonSpew_BaselineIC, " Generating GetElem(TypedArray[Int32]) stub");
JitSpew(JitSpew_BaselineIC, " Generating GetElem(TypedArray[Int32]) stub");
ICGetElem_TypedArray::Compiler compiler(cx, tarr->lastProperty(), tarr->type());
ICStub *typedArrayStub = compiler.getStub(compiler.getStubSpace(script));
if (!typedArrayStub)
@ -4095,7 +4095,7 @@ ICGetElem_Fallback::Compiler::generateStubCode(MacroAssembler &masm)
static bool
DoAtomizeString(JSContext *cx, HandleString string, MutableHandleValue result)
{
IonSpew(IonSpew_BaselineIC, " AtomizeString called");
JitSpew(JitSpew_BaselineIC, " AtomizeString called");
RootedValue key(cx, StringValue(string));
@ -5057,7 +5057,7 @@ DoSetElemFallback(JSContext *cx, BaselineFrame *frame, ICSetElem_Fallback *stub_
return false;
if (addingCase && !DenseSetElemStubExists(cx, ICStub::SetElem_DenseAdd, stub, obj)) {
IonSpew(IonSpew_BaselineIC,
JitSpew(JitSpew_BaselineIC,
" Generating SetElem_DenseAdd stub "
"(shape=%p, type=%p, protoDepth=%u)",
obj->lastProperty(), type.get(), protoDepth);
@ -5072,7 +5072,7 @@ DoSetElemFallback(JSContext *cx, BaselineFrame *frame, ICSetElem_Fallback *stub_
} else if (!addingCase &&
!DenseSetElemStubExists(cx, ICStub::SetElem_Dense, stub, obj))
{
IonSpew(IonSpew_BaselineIC,
JitSpew(JitSpew_BaselineIC,
" Generating SetElem_Dense stub (shape=%p, type=%p)",
obj->lastProperty(), type.get());
ICSetElem_Dense::Compiler compiler(cx, shape, type);
@ -5106,7 +5106,7 @@ DoSetElemFallback(JSContext *cx, BaselineFrame *frame, ICSetElem_Fallback *stub_
if (expectOutOfBounds)
RemoveExistingTypedArraySetElemStub(cx, stub, tarr);
IonSpew(IonSpew_BaselineIC,
JitSpew(JitSpew_BaselineIC,
" Generating SetElem_TypedArray stub (shape=%p, type=%u, oob=%s)",
tarr->lastProperty(), tarr->type(), expectOutOfBounds ? "yes" : "no");
ICSetElem_TypedArray::Compiler compiler(cx, tarr->lastProperty(), tarr->type(),
@ -5696,7 +5696,7 @@ TryAttachGlobalNameStub(JSContext *cx, HandleScript script, jsbytecode *pc,
// TODO: if there's a previous stub discard it, or just update its Shape + slot?
ICStub *monitorStub = stub->fallbackMonitorStub()->firstMonitorStub();
IonSpew(IonSpew_BaselineIC, " Generating GetName(GlobalName) stub");
JitSpew(JitSpew_BaselineIC, " Generating GetName(GlobalName) stub");
ICGetName_Global::Compiler compiler(cx, monitorStub, global->lastProperty(), slot);
ICStub *newStub = compiler.getStub(compiler.getStubSpace(script));
if (!newStub)
@ -5713,7 +5713,7 @@ TryAttachGlobalNameStub(JSContext *cx, HandleScript script, jsbytecode *pc,
if (IsCacheableGetPropCall(cx, global, global, shape, &isScripted) && !isScripted)
{
ICStub *monitorStub = stub->fallbackMonitorStub()->firstMonitorStub();
IonSpew(IonSpew_BaselineIC, " Generating GetName(GlobalName/NativeGetter) stub");
JitSpew(JitSpew_BaselineIC, " Generating GetName(GlobalName/NativeGetter) stub");
RootedFunction getter(cx, &shape->getterObject()->as<JSFunction>());
ICGetProp_CallNative::Compiler compiler(cx, monitorStub, global,
getter, script->pcToOffset(pc),
@ -6034,7 +6034,7 @@ DoGetIntrinsicFallback(JSContext *cx, BaselineFrame *frame, ICGetIntrinsic_Fallb
if (stub.invalid())
return true;
IonSpew(IonSpew_BaselineIC, " Generating GetIntrinsic optimized stub");
JitSpew(JitSpew_BaselineIC, " Generating GetIntrinsic optimized stub");
ICGetIntrinsic_Constant::Compiler compiler(cx, res);
ICStub *newStub = compiler.getStub(compiler.getStubSpace(script));
if (!newStub)
@ -6087,7 +6087,7 @@ TryAttachMagicArgumentsGetPropStub(JSContext *cx, JSScript *script, ICGetProp_Fa
if (name == cx->names().callee) {
MOZ_ASSERT(!script->strict());
IonSpew(IonSpew_BaselineIC, " Generating GetProp(MagicArgs.callee) stub");
JitSpew(JitSpew_BaselineIC, " Generating GetProp(MagicArgs.callee) stub");
// Unlike ICGetProp_ArgumentsLength, only magic argument stubs are
// supported at the moment.
@ -6125,7 +6125,7 @@ TryAttachLengthStub(JSContext *cx, JSScript *script, ICGetProp_Fallback *stub, H
if (val.isString()) {
JS_ASSERT(res.isInt32());
IonSpew(IonSpew_BaselineIC, " Generating GetProp(String.length) stub");
JitSpew(JitSpew_BaselineIC, " Generating GetProp(String.length) stub");
ICGetProp_StringLength::Compiler compiler(cx);
ICStub *newStub = compiler.getStub(compiler.getStubSpace(script));
if (!newStub)
@ -6137,7 +6137,7 @@ TryAttachLengthStub(JSContext *cx, JSScript *script, ICGetProp_Fallback *stub, H
}
if (val.isMagic(JS_OPTIMIZED_ARGUMENTS) && res.isInt32()) {
IonSpew(IonSpew_BaselineIC, " Generating GetProp(MagicArgs.length) stub");
JitSpew(JitSpew_BaselineIC, " Generating GetProp(MagicArgs.length) stub");
ICGetProp_ArgumentsLength::Compiler compiler(cx, ICGetProp_ArgumentsLength::Magic);
ICStub *newStub = compiler.getStub(compiler.getStubSpace(script));
if (!newStub)
@ -6154,7 +6154,7 @@ TryAttachLengthStub(JSContext *cx, JSScript *script, ICGetProp_Fallback *stub, H
RootedObject obj(cx, &val.toObject());
if (obj->is<ArrayObject>() && res.isInt32()) {
IonSpew(IonSpew_BaselineIC, " Generating GetProp(Array.length) stub");
JitSpew(JitSpew_BaselineIC, " Generating GetProp(Array.length) stub");
ICGetProp_ArrayLength::Compiler compiler(cx);
ICStub *newStub = compiler.getStub(compiler.getStubSpace(script));
if (!newStub)
@ -6166,7 +6166,7 @@ TryAttachLengthStub(JSContext *cx, JSScript *script, ICGetProp_Fallback *stub, H
}
if (obj->is<ArgumentsObject>() && res.isInt32()) {
IonSpew(IonSpew_BaselineIC, " Generating GetProp(ArgsObj.length %s) stub",
JitSpew(JitSpew_BaselineIC, " Generating GetProp(ArgsObj.length %s) stub",
obj->is<StrictArgumentsObject>() ? "Strict" : "Normal");
ICGetProp_ArgumentsLength::Which which = ICGetProp_ArgumentsLength::Normal;
if (obj->is<StrictArgumentsObject>())
@ -6198,7 +6198,7 @@ UpdateExistingGenerationalDOMProxyStub(ICGetProp_Fallback *stub,
if (updateStub->expandoAndGeneration() == expandoAndGeneration) {
// Update generation
uint32_t generation = expandoAndGeneration->generation;
IonSpew(IonSpew_BaselineIC,
JitSpew(JitSpew_BaselineIC,
" Updating existing stub with generation, old value: %i, "
"new value: %i", updateStub->generation(),
generation);
@ -6251,7 +6251,7 @@ TryAttachNativeGetPropStub(JSContext *cx, HandleScript script, jsbytecode *pc,
ICStub::Kind kind = (obj == holder) ? ICStub::GetProp_Native
: ICStub::GetProp_NativePrototype;
IonSpew(IonSpew_BaselineIC, " Generating GetProp(%s %s) stub",
JitSpew(JitSpew_BaselineIC, " Generating GetProp(%s %s) stub",
isDOMProxy ? "DOMProxy" : "Native",
(obj == holder) ? "direct" : "prototype");
ICGetPropNativeCompiler compiler(cx, kind, isCallProp, monitorStub, obj, holder,
@ -6286,7 +6286,7 @@ TryAttachNativeGetPropStub(JSContext *cx, HandleScript script, jsbytecode *pc,
JS_ASSERT(obj != holder);
JS_ASSERT(callee->hasScript());
IonSpew(IonSpew_BaselineIC, " Generating GetProp(NativeObj/ScriptedGetter %s:%d) stub",
JitSpew(JitSpew_BaselineIC, " Generating GetProp(NativeObj/ScriptedGetter %s:%d) stub",
callee->nonLazyScript()->filename(), callee->nonLazyScript()->lineno());
ICGetProp_CallScripted::Compiler compiler(cx, monitorStub, obj, holder, callee,
@ -6313,7 +6313,7 @@ TryAttachNativeGetPropStub(JSContext *cx, HandleScript script, jsbytecode *pc,
RootedFunction callee(cx, &shape->getterObject()->as<JSFunction>());
JS_ASSERT(callee->isNative());
IonSpew(IonSpew_BaselineIC, " Generating GetProp(%s%s/NativeGetter %p) stub",
JitSpew(JitSpew_BaselineIC, " Generating GetProp(%s%s/NativeGetter %p) stub",
isDOMProxy ? "DOMProxyObj" : "NativeObj",
isDOMProxy && domProxyHasGeneration ? "WithGeneration" : "",
callee->native());
@ -6359,7 +6359,7 @@ TryAttachNativeGetPropStub(JSContext *cx, HandleScript script, jsbytecode *pc,
return true;
#endif
IonSpew(IonSpew_BaselineIC, " Generating GetProp(DOMProxyProxy) stub");
JitSpew(JitSpew_BaselineIC, " Generating GetProp(DOMProxyProxy) stub");
Rooted<ProxyObject*> proxy(cx, &obj->as<ProxyObject>());
ICGetProp_DOMProxyShadowed::Compiler compiler(cx, monitorStub, proxy, name,
script->pcToOffset(pc));
@ -6417,7 +6417,7 @@ TryAttachPrimitiveGetPropStub(JSContext *cx, HandleScript script, jsbytecode *pc
ICStub *monitorStub = stub->fallbackMonitorStub()->firstMonitorStub();
IonSpew(IonSpew_BaselineIC, " Generating GetProp_Primitive stub");
JitSpew(JitSpew_BaselineIC, " Generating GetProp_Primitive stub");
ICGetProp_Primitive::Compiler compiler(cx, monitorStub, primitiveType, proto,
isFixedSlot, offset);
ICStub *newStub = compiler.getStub(compiler.getStubSpace(script));
@ -6460,7 +6460,7 @@ TryAttachNativeDoesNotExistStub(JSContext *cx, HandleScript script, jsbytecode *
RootedShape lastShape(cx, lastProto->lastProperty());
// Confirmed no-such-property. Add stub.
IonSpew(IonSpew_BaselineIC, " Generating GetProp_NativeDoesNotExist stub");
JitSpew(JitSpew_BaselineIC, " Generating GetProp_NativeDoesNotExist stub");
ICGetPropNativeDoesNotExistCompiler compiler(cx, monitorStub, obj, protoChainDepth);
ICStub *newStub = compiler.getStub(compiler.getStubSpace(script));
if (!newStub)
@ -7437,7 +7437,7 @@ TryAttachSetPropStub(JSContext *cx, HandleScript script, jsbytecode *pc, ICSetPr
uint32_t offset;
GetFixedOrDynamicSlotOffset(obj, shape->slot(), &isFixedSlot, &offset);
IonSpew(IonSpew_BaselineIC, " Generating SetProp(NativeObject.ADD) stub");
JitSpew(JitSpew_BaselineIC, " Generating SetProp(NativeObject.ADD) stub");
ICSetPropNativeAddCompiler compiler(cx, obj, oldShape, chainDepth, isFixedSlot, offset);
ICUpdatedStub *newStub = compiler.getStub(compiler.getStubSpace(script));
if (!newStub)
@ -7455,7 +7455,7 @@ TryAttachSetPropStub(JSContext *cx, HandleScript script, jsbytecode *pc, ICSetPr
uint32_t offset;
GetFixedOrDynamicSlotOffset(obj, shape->slot(), &isFixedSlot, &offset);
IonSpew(IonSpew_BaselineIC, " Generating SetProp(NativeObject.PROP) stub");
JitSpew(JitSpew_BaselineIC, " Generating SetProp(NativeObject.PROP) stub");
ICSetProp_Native::Compiler compiler(cx, obj, isFixedSlot, offset);
ICUpdatedStub *newStub = compiler.getStub(compiler.getStubSpace(script));
if (!newStub)
@ -7477,7 +7477,7 @@ TryAttachSetPropStub(JSContext *cx, HandleScript script, jsbytecode *pc, ICSetPr
JS_ASSERT(obj != holder);
JS_ASSERT(callee->hasScript());
IonSpew(IonSpew_BaselineIC, " Generating SetProp(NativeObj/ScriptedSetter %s:%d) stub",
JitSpew(JitSpew_BaselineIC, " Generating SetProp(NativeObj/ScriptedSetter %s:%d) stub",
callee->nonLazyScript()->filename(), callee->nonLazyScript()->lineno());
ICSetProp_CallScripted::Compiler compiler(cx, obj, holder, callee, script->pcToOffset(pc));
@ -7496,7 +7496,7 @@ TryAttachSetPropStub(JSContext *cx, HandleScript script, jsbytecode *pc, ICSetPr
JS_ASSERT(obj != holder);
JS_ASSERT(callee->isNative());
IonSpew(IonSpew_BaselineIC, " Generating SetProp(NativeObj/NativeSetter %p) stub",
JitSpew(JitSpew_BaselineIC, " Generating SetProp(NativeObj/NativeSetter %p) stub",
callee->native());
ICSetProp_CallNative::Compiler compiler(cx, obj, holder, callee, script->pcToOffset(pc));
@ -8053,7 +8053,7 @@ TryAttachFunApplyStub(JSContext *cx, ICCall_Fallback *stub, HandleScript script,
// right now, only handle situation where second argument is |arguments|
if (argv[1].isMagic(JS_OPTIMIZED_ARGUMENTS) && !script->needsArgsObj()) {
if (isScripted && !stub->hasStub(ICStub::Call_ScriptedApplyArguments)) {
IonSpew(IonSpew_BaselineIC, " Generating Call_ScriptedApplyArguments stub");
JitSpew(JitSpew_BaselineIC, " Generating Call_ScriptedApplyArguments stub");
ICCall_ScriptedApplyArguments::Compiler compiler(
cx, stub->fallbackMonitorStub()->firstMonitorStub(), script->pcToOffset(pc));
@ -8070,7 +8070,7 @@ TryAttachFunApplyStub(JSContext *cx, ICCall_Fallback *stub, HandleScript script,
if (argv[1].isObject() && argv[1].toObject().is<ArrayObject>()) {
if (isScripted && !stub->hasStub(ICStub::Call_ScriptedApplyArray)) {
IonSpew(IonSpew_BaselineIC, " Generating Call_ScriptedApplyArray stub");
JitSpew(JitSpew_BaselineIC, " Generating Call_ScriptedApplyArray stub");
ICCall_ScriptedApplyArray::Compiler compiler(
cx, stub->fallbackMonitorStub()->firstMonitorStub(), script->pcToOffset(pc));
@ -8102,7 +8102,7 @@ TryAttachFunCallStub(JSContext *cx, ICCall_Fallback *stub, HandleScript script,
if (target->hasScript() && target->nonLazyScript()->canBaselineCompile() &&
!stub->hasStub(ICStub::Call_ScriptedFunCall))
{
IonSpew(IonSpew_BaselineIC, " Generating Call_ScriptedFunCall stub");
JitSpew(JitSpew_BaselineIC, " Generating Call_ScriptedFunCall stub");
ICCall_ScriptedFunCall::Compiler compiler(cx, stub->fallbackMonitorStub()->firstMonitorStub(),
script->pcToOffset(pc));
@ -8237,13 +8237,13 @@ TryAttachCallStub(JSContext *cx, ICCall_Fallback *stub, HandleScript script, jsb
// Check if this stub chain has already generalized scripted calls.
if (stub->scriptedStubsAreGeneralized()) {
IonSpew(IonSpew_BaselineIC, " Chain already has generalized scripted call stub!");
JitSpew(JitSpew_BaselineIC, " Chain already has generalized scripted call stub!");
return true;
}
if (stub->scriptedStubCount() >= ICCall_Fallback::MAX_SCRIPTED_STUBS) {
// Create a Call_AnyScripted stub.
IonSpew(IonSpew_BaselineIC, " Generating Call_AnyScripted stub (cons=%s, spread=%s)",
JitSpew(JitSpew_BaselineIC, " Generating Call_AnyScripted stub (cons=%s, spread=%s)",
constructing ? "yes" : "no", isSpread ? "yes" : "no");
ICCallScriptedCompiler compiler(cx, stub->fallbackMonitorStub()->firstMonitorStub(),
@ -8274,7 +8274,7 @@ TryAttachCallStub(JSContext *cx, ICCall_Fallback *stub, HandleScript script, jsb
return false;
}
IonSpew(IonSpew_BaselineIC,
JitSpew(JitSpew_BaselineIC,
" Generating Call_Scripted stub (fun=%p, %s:%d, cons=%s, spread=%s)",
fun.get(), fun->nonLazyScript()->filename(), fun->nonLazyScript()->lineno(),
constructing ? "yes" : "no", isSpread ? "yes" : "no");
@ -8312,7 +8312,7 @@ TryAttachCallStub(JSContext *cx, ICCall_Fallback *stub, HandleScript script, jsb
}
if (stub->nativeStubCount() >= ICCall_Fallback::MAX_NATIVE_STUBS) {
IonSpew(IonSpew_BaselineIC,
JitSpew(JitSpew_BaselineIC,
" Too many Call_Native stubs. TODO: add Call_AnyNative!");
return true;
}
@ -8324,7 +8324,7 @@ TryAttachCallStub(JSContext *cx, ICCall_Fallback *stub, HandleScript script, jsb
return false;
}
IonSpew(IonSpew_BaselineIC, " Generating Call_Native stub (fun=%p, cons=%s, spread=%s)",
JitSpew(JitSpew_BaselineIC, " Generating Call_Native stub (fun=%p, cons=%s, spread=%s)",
fun.get(), constructing ? "yes" : "no", isSpread ? "yes" : "no");
ICCall_Native::Compiler compiler(cx, stub->fallbackMonitorStub()->firstMonitorStub(),
fun, templateObject, constructing, isSpread,
@ -9979,7 +9979,7 @@ DoTypeOfFallback(JSContext *cx, BaselineFrame *frame, ICTypeOf_Fallback *stub, H
JS_ASSERT(type != JSTYPE_NULL);
if (type != JSTYPE_OBJECT && type != JSTYPE_FUNCTION) {
// Create a new TypeOf stub.
IonSpew(IonSpew_BaselineIC, " Generating TypeOf stub for JSType (%d)", (int) type);
JitSpew(JitSpew_BaselineIC, " Generating TypeOf stub for JSType (%d)", (int) type);
ICTypeOf_Typed::Compiler compiler(cx, type, string);
ICStub *typeOfStub = compiler.getStub(compiler.getStubSpace(frame->script()));
if (!typeOfStub)
@ -10069,7 +10069,7 @@ DoRetSubFallback(JSContext *cx, BaselineFrame *frame, ICRetSub_Fallback *stub,
return true;
// Attach an optimized stub for this pc offset.
IonSpew(IonSpew_BaselineIC, " Generating RetSub stub for pc offset %u", offset);
JitSpew(JitSpew_BaselineIC, " Generating RetSub stub for pc offset %u", offset);
ICRetSub_Resume::Compiler compiler(cx, offset, *resumeAddr);
ICStub *optStub = compiler.getStub(compiler.getStubSpace(script));
if (!optStub)

View File

@ -11,8 +11,8 @@
#include "jit/BaselineCompiler.h"
#include "jit/BaselineIC.h"
#include "jit/CompileInfo.h"
#include "jit/IonSpewer.h"
#include "jit/JitCommon.h"
#include "jit/JitSpewer.h"
#include "vm/Interpreter.h"
#include "vm/TraceLogging.h"
@ -62,20 +62,20 @@ static bool
CheckFrame(InterpreterFrame *fp)
{
if (fp->isGeneratorFrame()) {
IonSpew(IonSpew_BaselineAbort, "generator frame");
JitSpew(JitSpew_BaselineAbort, "generator frame");
return false;
}
if (fp->isDebuggerFrame()) {
// Debugger eval-in-frame. These are likely short-running scripts so
// don't bother compiling them for now.
IonSpew(IonSpew_BaselineAbort, "debugger frame");
JitSpew(JitSpew_BaselineAbort, "debugger frame");
return false;
}
if (fp->isNonEvalFunctionFrame() && fp->numActualArgs() > BASELINE_MAX_ARGS_LENGTH) {
// Fall back to the interpreter to avoid running out of stack space.
IonSpew(IonSpew_BaselineAbort, "Too many arguments (%u)", fp->numActualArgs());
JitSpew(JitSpew_BaselineAbort, "Too many arguments (%u)", fp->numActualArgs());
return false;
}
@ -317,7 +317,7 @@ jit::CanEnterBaselineMethod(JSContext *cx, RunState &state)
InvokeState &invoke = *state.asInvoke();
if (invoke.args().length() > BASELINE_MAX_ARGS_LENGTH) {
IonSpew(IonSpew_BaselineAbort, "Too many arguments (%u)", invoke.args().length());
JitSpew(JitSpew_BaselineAbort, "Too many arguments (%u)", invoke.args().length());
return Method_CantCompile;
}
@ -326,12 +326,12 @@ jit::CanEnterBaselineMethod(JSContext *cx, RunState &state)
} else if (state.isExecute()) {
ExecuteType type = state.asExecute()->type();
if (type == EXECUTE_DEBUG || type == EXECUTE_DEBUG_GLOBAL) {
IonSpew(IonSpew_BaselineAbort, "debugger frame");
JitSpew(JitSpew_BaselineAbort, "debugger frame");
return Method_CantCompile;
}
} else {
JS_ASSERT(state.isGenerator());
IonSpew(IonSpew_BaselineAbort, "generator frame");
JitSpew(JitSpew_BaselineAbort, "generator frame");
return Method_CantCompile;
}
@ -803,7 +803,7 @@ BaselineScript::toggleSPS(bool enable)
{
JS_ASSERT(enable == !(bool)spsOn_);
IonSpew(IonSpew_BaselineIC, " toggling SPS %s for BaselineScript %p",
JitSpew(JitSpew_BaselineIC, " toggling SPS %s for BaselineScript %p",
enable ? "on" : "off", this);
// Toggle the jump
@ -820,7 +820,7 @@ BaselineScript::toggleSPS(bool enable)
void
BaselineScript::purgeOptimizedStubs(Zone *zone)
{
IonSpew(IonSpew_BaselineIC, "Purging optimized stubs");
JitSpew(JitSpew_BaselineIC, "Purging optimized stubs");
for (size_t i = 0; i < numICEntries(); i++) {
ICEntry &entry = icEntry(i);

View File

@ -7,7 +7,7 @@
#include "jit/BytecodeAnalysis.h"
#include "jsopcode.h"
#include "jit/IonSpewer.h"
#include "jit/JitSpewer.h"
#include "jsopcodeinlines.h"
using namespace js;
@ -57,7 +57,7 @@ BytecodeAnalysis::init(TempAllocator &alloc, GSNCache &gsn)
JSOp op = JSOp(*pc);
unsigned offset = script_->pcToOffset(pc);
IonSpew(IonSpew_BaselineOp, "Analyzing op @ %d (end=%d): %s",
JitSpew(JitSpew_BaselineOp, "Analyzing op @ %d (end=%d): %s",
int(script_->pcToOffset(pc)), int(script_->length()), js_CodeName[op]);
// If this bytecode info has not yet been initialized, it's not reachable.

View File

@ -26,8 +26,8 @@
#include "jit/IonCaches.h"
#include "jit/IonLinker.h"
#include "jit/IonOptimizationLevels.h"
#include "jit/IonSpewer.h"
#include "jit/JitcodeMap.h"
#include "jit/JitSpewer.h"
#include "jit/Lowering.h"
#include "jit/MIRGenerator.h"
#include "jit/MoveEmitter.h"
@ -3406,7 +3406,7 @@ CodeGenerator::generateBody()
if (current->isTrivial())
continue;
IonSpew(IonSpew_Codegen, "# block%lu%s:", i,
JitSpew(JitSpew_Codegen, "# block%lu%s:", i,
current->mir()->isLoopHeader() ? " (loop header)" : "");
masm.bind(current->label());
@ -3424,10 +3424,10 @@ CodeGenerator::generateBody()
for (LInstructionIterator iter = current->begin(); iter != current->end(); iter++) {
#ifdef DEBUG
IonSpewStart(IonSpew_Codegen, "instruction %s", iter->opName());
JitSpewStart(JitSpew_Codegen, "instruction %s", iter->opName());
if (const char *extra = iter->extraName())
IonSpewCont(IonSpew_Codegen, ":%s", extra);
IonSpewFin(IonSpew_Codegen);
JitSpewCont(JitSpew_Codegen, ":%s", extra);
JitSpewFin(JitSpew_Codegen);
#endif
if (counts)
@ -6593,7 +6593,7 @@ CodeGenerator::visitRestPar(LRestPar *lir)
bool
CodeGenerator::generateAsmJS(AsmJSFunctionLabels *labels)
{
IonSpew(IonSpew_Codegen, "# Emitting asm.js code");
JitSpew(JitSpew_Codegen, "# Emitting asm.js code");
// AsmJS doesn't do SPS instrumentation.
sps_.disable();
@ -6642,7 +6642,7 @@ CodeGenerator::generateAsmJS(AsmJSFunctionLabels *labels)
bool
CodeGenerator::generate()
{
IonSpew(IonSpew_Codegen, "# Emitting code for script %s:%d",
JitSpew(JitSpew_Codegen, "# Emitting code for script %s:%d",
gen->info().script()->filename(),
gen->info().script()->lineno());
@ -6921,7 +6921,7 @@ CodeGenerator::link(JSContext *cx, types::CompilerConstraintList *constraints)
ImmPtr(ionScript),
ImmPtr((void*)-1));
IonSpew(IonSpew_Codegen, "Created IonScript %p (raw %p)",
JitSpew(JitSpew_Codegen, "Created IonScript %p (raw %p)",
(void *) ionScript, (void *) code->raw());
ionScript->setInvalidationEpilogueDataOffset(invalidateEpilogueData_.offset());

View File

@ -26,10 +26,10 @@
#include "jit/IonAnalysis.h"
#include "jit/IonBuilder.h"
#include "jit/IonOptimizationLevels.h"
#include "jit/IonSpewer.h"
#include "jit/JitcodeMap.h"
#include "jit/JitCommon.h"
#include "jit/JitCompartment.h"
#include "jit/JitSpewer.h"
#include "jit/LICM.h"
#include "jit/LinearScan.h"
#include "jit/LIR.h"
@ -209,18 +209,18 @@ JitRuntime::initialize(JSContext *cx)
if (!functionWrappers_ || !functionWrappers_->init())
return false;
IonSpew(IonSpew_Codegen, "# Emitting exception tail stub");
JitSpew(JitSpew_Codegen, "# Emitting exception tail stub");
exceptionTail_ = generateExceptionTailStub(cx);
if (!exceptionTail_)
return false;
IonSpew(IonSpew_Codegen, "# Emitting bailout tail stub");
JitSpew(JitSpew_Codegen, "# Emitting bailout tail stub");
bailoutTail_ = generateBailoutTailStub(cx);
if (!bailoutTail_)
return false;
if (cx->runtime()->jitSupportsFloatingPoint) {
IonSpew(IonSpew_Codegen, "# Emitting bailout tables");
JitSpew(JitSpew_Codegen, "# Emitting bailout tables");
// Initialize some Ion-only stubs that require floating-point support.
if (!bailoutTables_.reserve(FrameSizeClass::ClassLimit().classId()))
@ -236,68 +236,68 @@ JitRuntime::initialize(JSContext *cx)
return false;
}
IonSpew(IonSpew_Codegen, "# Emitting bailout handler");
JitSpew(JitSpew_Codegen, "# Emitting bailout handler");
bailoutHandler_ = generateBailoutHandler(cx, SequentialExecution);
if (!bailoutHandler_)
return false;
IonSpew(IonSpew_Codegen, "# Emitting parallel bailout handler");
JitSpew(JitSpew_Codegen, "# Emitting parallel bailout handler");
parallelBailoutHandler_ = generateBailoutHandler(cx, ParallelExecution);
if (!parallelBailoutHandler_)
return false;
IonSpew(IonSpew_Codegen, "# Emitting invalidator");
JitSpew(JitSpew_Codegen, "# Emitting invalidator");
invalidator_ = generateInvalidator(cx);
if (!invalidator_)
return false;
}
IonSpew(IonSpew_Codegen, "# Emitting sequential arguments rectifier");
JitSpew(JitSpew_Codegen, "# Emitting sequential arguments rectifier");
argumentsRectifier_ = generateArgumentsRectifier(cx, SequentialExecution, &argumentsRectifierReturnAddr_);
if (!argumentsRectifier_)
return false;
IonSpew(IonSpew_Codegen, "# Emitting parallel arguments rectifier");
JitSpew(JitSpew_Codegen, "# Emitting parallel arguments rectifier");
parallelArgumentsRectifier_ = generateArgumentsRectifier(cx, ParallelExecution, nullptr);
if (!parallelArgumentsRectifier_)
return false;
IonSpew(IonSpew_Codegen, "# Emitting EnterJIT sequence");
JitSpew(JitSpew_Codegen, "# Emitting EnterJIT sequence");
enterJIT_ = generateEnterJIT(cx, EnterJitOptimized);
if (!enterJIT_)
return false;
IonSpew(IonSpew_Codegen, "# Emitting EnterBaselineJIT sequence");
JitSpew(JitSpew_Codegen, "# Emitting EnterBaselineJIT sequence");
enterBaselineJIT_ = generateEnterJIT(cx, EnterJitBaseline);
if (!enterBaselineJIT_)
return false;
IonSpew(IonSpew_Codegen, "# Emitting Pre Barrier for Value");
JitSpew(JitSpew_Codegen, "# Emitting Pre Barrier for Value");
valuePreBarrier_ = generatePreBarrier(cx, MIRType_Value);
if (!valuePreBarrier_)
return false;
IonSpew(IonSpew_Codegen, "# Emitting Pre Barrier for Shape");
JitSpew(JitSpew_Codegen, "# Emitting Pre Barrier for Shape");
shapePreBarrier_ = generatePreBarrier(cx, MIRType_Shape);
if (!shapePreBarrier_)
return false;
IonSpew(IonSpew_Codegen, "# Emitting Pre Barrier for TypeObject");
JitSpew(JitSpew_Codegen, "# Emitting Pre Barrier for TypeObject");
typeObjectPreBarrier_ = generatePreBarrier(cx, MIRType_TypeObject);
if (!typeObjectPreBarrier_)
return false;
IonSpew(IonSpew_Codegen, "# Emitting malloc stub");
JitSpew(JitSpew_Codegen, "# Emitting malloc stub");
mallocStub_ = generateMallocStub(cx);
if (!mallocStub_)
return false;
IonSpew(IonSpew_Codegen, "# Emitting free stub");
JitSpew(JitSpew_Codegen, "# Emitting free stub");
freeStub_ = generateFreeStub(cx);
if (!freeStub_)
return false;
IonSpew(IonSpew_Codegen, "# Emitting VM function wrappers");
JitSpew(JitSpew_Codegen, "# Emitting VM function wrappers");
for (VMFunction *fun = VMFunction::functions; fun; fun = fun->next) {
if (!generateVMWrapper(cx, *fun))
return false;
@ -327,7 +327,7 @@ bool
JitRuntime::ensureForkJoinGetSliceStubExists(JSContext *cx)
{
if (!forkJoinGetSliceStub_) {
IonSpew(IonSpew_Codegen, "# Emitting ForkJoinGetSlice stub");
JitSpew(JitSpew_Codegen, "# Emitting ForkJoinGetSlice stub");
AutoLockForExclusiveAccess lock(cx);
AutoCompartment ac(cx, cx->runtime()->atomsCompartment());
forkJoinGetSliceStub_ = generateForkJoinGetSliceStub(cx);
@ -1180,7 +1180,7 @@ IonScript::getOsiIndex(uint32_t disp) const
const OsiIndex *
IonScript::getOsiIndex(uint8_t *retAddr) const
{
IonSpew(IonSpew_Invalidate, "IonScript %p has method %p raw %p", (void *) this, (void *)
JitSpew(JitSpew_Invalidate, "IonScript %p has method %p raw %p", (void *) this, (void *)
method(), method()->raw());
JS_ASSERT(containsCodeAddress(retAddr));
@ -1972,11 +1972,11 @@ IonCompile(JSContext *cx, JSScript *script,
if (!recompile)
SetIonScript(builderScript, executionMode, ION_COMPILING_SCRIPT);
IonSpew(IonSpew_Logs, "Can't log script %s:%d. (Compiled on background thread.)",
JitSpew(JitSpew_Logs, "Can't log script %s:%d. (Compiled on background thread.)",
builderScript->filename(), builderScript->lineno());
if (!StartOffThreadIonCompile(cx, builder)) {
IonSpew(IonSpew_Abort, "Unable to start off-thread ion compilation.");
JitSpew(JitSpew_Abort, "Unable to start off-thread ion compilation.");
return AbortReason_Alloc;
}
@ -1989,7 +1989,7 @@ IonCompile(JSContext *cx, JSScript *script,
ScopedJSDeletePtr<CodeGenerator> codegen(CompileBackEnd(builder));
if (!codegen) {
IonSpew(IonSpew_Abort, "Failed during back-end compilation.");
JitSpew(JitSpew_Abort, "Failed during back-end compilation.");
return AbortReason_Disable;
}
@ -2007,12 +2007,12 @@ CheckFrame(BaselineFrame *frame)
// This check is to not overrun the stack.
if (frame->isFunctionFrame()) {
if (TooManyActualArguments(frame->numActualArgs())) {
IonSpew(IonSpew_Abort, "too many actual args");
JitSpew(JitSpew_Abort, "too many actual args");
return false;
}
if (TooManyFormalArguments(frame->numFormalArgs())) {
IonSpew(IonSpew_Abort, "too many args");
JitSpew(JitSpew_Abort, "too many args");
return false;
}
}
@ -2027,7 +2027,7 @@ CheckScript(JSContext *cx, JSScript *script, bool osr)
// Eval frames are not yet supported. Supporting this will require new
// logic in pushBailoutFrame to deal with linking prev.
// Additionally, JSOP_DEFVAR support will require baking in isEvalFrame().
IonSpew(IonSpew_Abort, "eval script");
JitSpew(JitSpew_Abort, "eval script");
return false;
}
@ -2035,7 +2035,7 @@ CheckScript(JSContext *cx, JSScript *script, bool osr)
// Support non-CNG functions but not other scripts. For global scripts,
// IonBuilder currently uses the global object as scope chain, this is
// not valid for non-CNG code.
IonSpew(IonSpew_Abort, "not compile-and-go");
JitSpew(JitSpew_Abort, "not compile-and-go");
return false;
}
@ -2054,7 +2054,7 @@ CheckScriptSize(JSContext *cx, JSScript* script)
numLocalsAndArgs > MAX_MAIN_THREAD_LOCALS_AND_ARGS)
{
if (!OffThreadCompilationAvailable(cx)) {
IonSpew(IonSpew_Abort, "Script too large (%u bytes) (%u locals/args)",
JitSpew(JitSpew_Abort, "Script too large (%u bytes) (%u locals/args)",
script->length(), numLocalsAndArgs);
return Method_CantCompile;
}
@ -2097,18 +2097,18 @@ Compile(JSContext *cx, HandleScript script, BaselineFrame *osrFrame, jsbytecode
return Method_Skipped;
if (cx->compartment()->debugMode()) {
IonSpew(IonSpew_Abort, "debugging");
JitSpew(JitSpew_Abort, "debugging");
return Method_CantCompile;
}
if (!CheckScript(cx, script, bool(osrPc))) {
IonSpew(IonSpew_Abort, "Aborted compilation of %s:%d", script->filename(), script->lineno());
JitSpew(JitSpew_Abort, "Aborted compilation of %s:%d", script->filename(), script->lineno());
return Method_CantCompile;
}
MethodStatus status = CheckScriptSize(cx, script);
if (status != Method_Compiled) {
IonSpew(IonSpew_Abort, "Aborted compilation of %s:%d", script->filename(), script->lineno());
JitSpew(JitSpew_Abort, "Aborted compilation of %s:%d", script->filename(), script->lineno());
return status;
}
@ -2256,13 +2256,13 @@ jit::CanEnter(JSContext *cx, RunState &state)
InvokeState &invoke = *state.asInvoke();
if (TooManyActualArguments(invoke.args().length())) {
IonSpew(IonSpew_Abort, "too many actual args");
JitSpew(JitSpew_Abort, "too many actual args");
ForbidCompilation(cx, script);
return Method_CantCompile;
}
if (TooManyFormalArguments(invoke.args().callee().as<JSFunction>().nargs())) {
IonSpew(IonSpew_Abort, "too many args");
JitSpew(JitSpew_Abort, "too many args");
ForbidCompilation(cx, script);
return Method_CantCompile;
}
@ -2270,7 +2270,7 @@ jit::CanEnter(JSContext *cx, RunState &state)
if (!state.maybeCreateThisForConstructor(cx))
return Method_Skipped;
} else if (state.isGenerator()) {
IonSpew(IonSpew_Abort, "generator frame");
JitSpew(JitSpew_Abort, "generator frame");
ForbidCompilation(cx, script);
return Method_CantCompile;
}
@ -2553,7 +2553,7 @@ jit::FastInvoke(JSContext *cx, HandleFunction fun, CallArgs &args)
static void
InvalidateActivation(FreeOp *fop, uint8_t *jitTop, bool invalidateAll)
{
IonSpew(IonSpew_Invalidate, "BEGIN invalidating activation");
JitSpew(JitSpew_Invalidate, "BEGIN invalidating activation");
size_t frameno = 1;
@ -2563,32 +2563,32 @@ InvalidateActivation(FreeOp *fop, uint8_t *jitTop, bool invalidateAll)
#ifdef DEBUG
switch (it.type()) {
case JitFrame_Exit:
IonSpew(IonSpew_Invalidate, "#%d exit frame @ %p", frameno, it.fp());
JitSpew(JitSpew_Invalidate, "#%d exit frame @ %p", frameno, it.fp());
break;
case JitFrame_BaselineJS:
case JitFrame_IonJS:
{
JS_ASSERT(it.isScripted());
const char *type = it.isIonJS() ? "Optimized" : "Baseline";
IonSpew(IonSpew_Invalidate, "#%d %s JS frame @ %p, %s:%d (fun: %p, script: %p, pc %p)",
JitSpew(JitSpew_Invalidate, "#%d %s JS frame @ %p, %s:%d (fun: %p, script: %p, pc %p)",
frameno, type, it.fp(), it.script()->filename(), it.script()->lineno(),
it.maybeCallee(), (JSScript *)it.script(), it.returnAddressToFp());
break;
}
case JitFrame_BaselineStub:
IonSpew(IonSpew_Invalidate, "#%d baseline stub frame @ %p", frameno, it.fp());
JitSpew(JitSpew_Invalidate, "#%d baseline stub frame @ %p", frameno, it.fp());
break;
case JitFrame_Rectifier:
IonSpew(IonSpew_Invalidate, "#%d rectifier frame @ %p", frameno, it.fp());
JitSpew(JitSpew_Invalidate, "#%d rectifier frame @ %p", frameno, it.fp());
break;
case JitFrame_Unwound_IonJS:
case JitFrame_Unwound_BaselineStub:
MOZ_CRASH("invalid");
case JitFrame_Unwound_Rectifier:
IonSpew(IonSpew_Invalidate, "#%d unwound rectifier frame @ %p", frameno, it.fp());
JitSpew(JitSpew_Invalidate, "#%d unwound rectifier frame @ %p", frameno, it.fp());
break;
case JitFrame_Entry:
IonSpew(IonSpew_Invalidate, "#%d entry frame @ %p", frameno, it.fp());
JitSpew(JitSpew_Invalidate, "#%d entry frame @ %p", frameno, it.fp());
break;
}
#endif
@ -2668,12 +2668,12 @@ InvalidateActivation(FreeOp *fop, uint8_t *jitTop, bool invalidateAll)
CodeLocationLabel osiPatchPoint = SafepointReader::InvalidationPatchPoint(ionScript, si);
CodeLocationLabel invalidateEpilogue(ionCode, CodeOffsetLabel(ionScript->invalidateEpilogueOffset()));
IonSpew(IonSpew_Invalidate, " ! Invalidate ionScript %p (ref %u) -> patching osipoint %p",
JitSpew(JitSpew_Invalidate, " ! Invalidate ionScript %p (ref %u) -> patching osipoint %p",
ionScript, ionScript->refcount(), (void *) osiPatchPoint.raw());
Assembler::PatchWrite_NearCall(osiPatchPoint, invalidateEpilogue);
}
IonSpew(IonSpew_Invalidate, "END invalidating activation");
JitSpew(JitSpew_Invalidate, "END invalidating activation");
}
void
@ -2693,7 +2693,7 @@ jit::InvalidateAll(FreeOp *fop, Zone *zone)
for (JitActivationIterator iter(fop->runtime()); !iter.done(); ++iter) {
if (iter->compartment()->zone() == zone) {
IonSpew(IonSpew_Invalidate, "Invalidating all frames for GC");
JitSpew(JitSpew_Invalidate, "Invalidating all frames for GC");
InvalidateActivation(fop, iter.jitTop(), true);
}
}
@ -2705,7 +2705,7 @@ jit::Invalidate(types::TypeZone &types, FreeOp *fop,
const Vector<types::RecompileInfo> &invalid, bool resetUses,
bool cancelOffThread)
{
IonSpew(IonSpew_Invalidate, "Start invalidation.");
JitSpew(JitSpew_Invalidate, "Start invalidation.");
// Add an invalidation reference to all invalidated IonScripts to indicate
// to the traversal which frames have been invalidated.
@ -2721,7 +2721,7 @@ jit::Invalidate(types::TypeZone &types, FreeOp *fop,
if (!co.ion())
continue;
IonSpew(IonSpew_Invalidate, " Invalidate %s:%u, IonScript %p",
JitSpew(JitSpew_Invalidate, " Invalidate %s:%u, IonScript %p",
co.script()->filename(), co.script()->lineno(), co.ion());
// Keep the ion script alive during the invalidation and flag this
@ -2732,7 +2732,7 @@ jit::Invalidate(types::TypeZone &types, FreeOp *fop,
}
if (!numInvalidations) {
IonSpew(IonSpew_Invalidate, " No IonScript invalidation.");
JitSpew(JitSpew_Invalidate, " No IonScript invalidation.");
return;
}
@ -2899,7 +2899,7 @@ jit::ForbidCompilation(JSContext *cx, JSScript *script)
void
jit::ForbidCompilation(JSContext *cx, JSScript *script, ExecutionMode mode)
{
IonSpew(IonSpew_Abort, "Disabling Ion mode %d compilation of script %s:%d",
JitSpew(JitSpew_Abort, "Disabling Ion mode %d compilation of script %s:%d",
mode, script->filename(), script->lineno());
CancelOffThreadIonCompile(cx->compartment(), script);
@ -2959,7 +2959,7 @@ AutoFlushICache::setRange(uintptr_t start, size_t len)
AutoFlushICache *afc = TlsPerThreadData.get()->PerThreadData::autoFlushICache();
JS_ASSERT(afc);
JS_ASSERT(!afc->start_);
IonSpewCont(IonSpew_CacheFlush, "(%x %x):", start, len);
JitSpewCont(JitSpew_CacheFlush, "(%x %x):", start, len);
uintptr_t stop = start + len;
afc->start_ = start;
@ -2992,7 +2992,7 @@ AutoFlushICache::flush(uintptr_t start, size_t len)
PerThreadData *pt = TlsPerThreadData.get();
AutoFlushICache *afc = pt ? pt->PerThreadData::autoFlushICache() : nullptr;
if (!afc) {
IonSpewCont(IonSpew_CacheFlush, "#");
JitSpewCont(JitSpew_CacheFlush, "#");
ExecutableAllocator::cacheFlush((void*)start, len);
JS_ASSERT(len <= 16);
return;
@ -3001,11 +3001,11 @@ AutoFlushICache::flush(uintptr_t start, size_t len)
uintptr_t stop = start + len;
if (start >= afc->start_ && stop <= afc->stop_) {
// Update is within the pending flush range, so defer to the end of the context.
IonSpewCont(IonSpew_CacheFlush, afc->inhibit_ ? "-" : "=");
JitSpewCont(JitSpew_CacheFlush, afc->inhibit_ ? "-" : "=");
return;
}
IonSpewCont(IonSpew_CacheFlush, afc->inhibit_ ? "x" : "*");
JitSpewCont(JitSpew_CacheFlush, afc->inhibit_ ? "x" : "*");
ExecutableAllocator::cacheFlush((void *)start, len);
#endif
}
@ -3019,7 +3019,7 @@ AutoFlushICache::setInhibit()
AutoFlushICache *afc = TlsPerThreadData.get()->PerThreadData::autoFlushICache();
JS_ASSERT(afc);
JS_ASSERT(afc->start_);
IonSpewCont(IonSpew_CacheFlush, "I");
JitSpewCont(JitSpew_CacheFlush, "I");
afc->inhibit_ = true;
#endif
}
@ -3053,9 +3053,9 @@ AutoFlushICache::AutoFlushICache(const char *nonce, bool inhibit)
PerThreadData *pt = TlsPerThreadData.get();
AutoFlushICache *afc = pt->PerThreadData::autoFlushICache();
if (afc)
IonSpew(IonSpew_CacheFlush, "<%s,%s%s ", nonce, afc->name_, inhibit ? " I" : "");
JitSpew(JitSpew_CacheFlush, "<%s,%s%s ", nonce, afc->name_, inhibit ? " I" : "");
else
IonSpewCont(IonSpew_CacheFlush, "<%s%s ", nonce, inhibit ? " I" : "");
JitSpewCont(JitSpew_CacheFlush, "<%s%s ", nonce, inhibit ? " I" : "");
prev_ = afc;
pt->PerThreadData::setAutoFlushICache(this);
@ -3071,8 +3071,8 @@ AutoFlushICache::~AutoFlushICache()
if (!inhibit_ && start_)
ExecutableAllocator::cacheFlush((void *)start_, size_t(stop_ - start_));
IonSpewCont(IonSpew_CacheFlush, "%s%s>", name_, start_ ? "" : " U");
IonSpewFin(IonSpew_CacheFlush);
JitSpewCont(JitSpew_CacheFlush, "%s%s>", name_, start_ ? "" : " U");
JitSpewFin(JitSpew_CacheFlush);
pt->PerThreadData::setAutoFlushICache(prev_);
#endif
}
@ -3191,7 +3191,7 @@ AutoDebugModeInvalidation::~AutoDebugModeInvalidation()
JSCompartment *comp = iter->compartment();
if (comp_ == comp || zone_ == comp->zone()) {
IonContext ictx(CompileRuntime::get(rt));
IonSpew(IonSpew_Invalidate, "Invalidating frames for debug mode toggle");
JitSpew(JitSpew_Invalidate, "Invalidating frames for debug mode toggle");
InvalidateActivation(fop, iter.jitTop(), true);
}
}

View File

@ -15,7 +15,7 @@
#include "jit/BaselineInspector.h"
#include "jit/Ion.h"
#include "jit/IonOptimizationLevels.h"
#include "jit/IonSpewer.h"
#include "jit/JitSpewer.h"
#include "jit/Lowering.h"
#include "jit/MIRGraph.h"
#include "vm/ArgumentsObject.h"
@ -173,7 +173,7 @@ IonBuilder::abort(const char *message, ...)
va_start(ap, message);
abortFmt(message, ap);
va_end(ap);
IonSpew(IonSpew_Abort, "aborted @ %s:%d", script()->filename(), PCToLineNumber(script(), pc));
JitSpew(JitSpew_Abort, "aborted @ %s:%d", script()->filename(), PCToLineNumber(script(), pc));
#endif
return false;
}
@ -183,7 +183,7 @@ IonBuilder::spew(const char *message)
{
// Don't call PCToLineNumber in release builds.
#ifdef DEBUG
IonSpew(IonSpew_MIR, "%s @ %s:%d", message, script()->filename(), PCToLineNumber(script(), pc));
JitSpew(JitSpew_MIR, "%s @ %s:%d", message, script()->filename(), PCToLineNumber(script(), pc));
#endif
}
@ -328,10 +328,10 @@ IonBuilder::InliningDecision
IonBuilder::DontInline(JSScript *targetScript, const char *reason)
{
if (targetScript) {
IonSpew(IonSpew_Inlining, "Cannot inline %s:%u: %s",
JitSpew(JitSpew_Inlining, "Cannot inline %s:%u: %s",
targetScript->filename(), targetScript->lineno(), reason);
} else {
IonSpew(IonSpew_Inlining, "Cannot inline: %s", reason);
JitSpew(JitSpew_Inlining, "Cannot inline: %s", reason);
}
return InliningDecision_DontInline;
@ -649,15 +649,15 @@ IonBuilder::build()
#ifdef DEBUG
if (info().executionModeIsAnalysis()) {
IonSpew(IonSpew_Scripts, "Analyzing script %s:%d (%p) %s",
JitSpew(JitSpew_Scripts, "Analyzing script %s:%d (%p) %s",
script()->filename(), script()->lineno(), (void *)script(),
ExecutionModeString(info().executionMode()));
} else if (info().executionMode() == SequentialExecution && script()->hasIonScript()) {
IonSpew(IonSpew_Scripts, "Recompiling script %s:%d (%p) (usecount=%d, level=%s)",
JitSpew(JitSpew_Scripts, "Recompiling script %s:%d (%p) (usecount=%d, level=%s)",
script()->filename(), script()->lineno(), (void *)script(),
(int)script()->getUseCount(), OptimizationLevelString(optimizationInfo().level()));
} else {
IonSpew(IonSpew_Scripts, "Compiling script %s:%d (%p) (usecount=%d, level=%s)",
JitSpew(JitSpew_Scripts, "Compiling script %s:%d (%p) (usecount=%d, level=%s)",
script()->filename(), script()->lineno(), (void *)script(),
(int)script()->getUseCount(), OptimizationLevelString(optimizationInfo().level()));
}
@ -802,7 +802,7 @@ IonBuilder::buildInline(IonBuilder *callerBuilder, MResumePoint *callerResumePoi
inlineCallInfo_ = &callInfo;
IonSpew(IonSpew_Scripts, "Inlining script %s:%d (%p)",
JitSpew(JitSpew_Scripts, "Inlining script %s:%d (%p)",
script()->filename(), script()->lineno(), (void *)script());
callerBuilder_ = callerBuilder;
@ -850,7 +850,7 @@ IonBuilder::buildInline(IonBuilder *callerBuilder, MResumePoint *callerResumePoi
// Initialize |this| slot.
current->initSlot(info().thisSlot(), callInfo.thisArg());
IonSpew(IonSpew_Inlining, "Initializing %u arg slots", info().nargs());
JitSpew(JitSpew_Inlining, "Initializing %u arg slots", info().nargs());
// NB: Ion does not inline functions which |needsArgsObj|. So using argSlot()
// instead of argSlotUnchecked() below is OK
@ -874,7 +874,7 @@ IonBuilder::buildInline(IonBuilder *callerBuilder, MResumePoint *callerResumePoi
if (!initScopeChain(callInfo.fun()))
return false;
IonSpew(IonSpew_Inlining, "Initializing %u local slots", info().nlocals());
JitSpew(JitSpew_Inlining, "Initializing %u local slots", info().nlocals());
// Initialize local variables.
for (uint32_t i = 0; i < info().nlocals(); i++) {
@ -883,7 +883,7 @@ IonBuilder::buildInline(IonBuilder *callerBuilder, MResumePoint *callerResumePoi
current->initSlot(info().localSlot(i), undef);
}
IonSpew(IonSpew_Inlining, "Inline entry block MResumePoint %p, %u operands",
JitSpew(JitSpew_Inlining, "Inline entry block MResumePoint %p, %u operands",
(void *) current->entryResumePoint(), current->entryResumePoint()->numOperands());
// +2 for the scope chain and |this|, maybe another +1 for arguments object slot.
@ -1025,7 +1025,7 @@ IonBuilder::initScopeChain(MDefinition *callee)
bool
IonBuilder::initArgumentsObject()
{
IonSpew(IonSpew_MIR, "%s:%d - Emitting code to initialize arguments object! block=%p",
JitSpew(JitSpew_MIR, "%s:%d - Emitting code to initialize arguments object! block=%p",
script()->filename(), script()->lineno(), current);
JS_ASSERT(info().needsArgsObj());
MCreateArgumentsObject *argsObj = MCreateArgumentsObject::New(alloc(), current->scopeChain());
@ -4035,7 +4035,7 @@ IonBuilder::inlineScriptedCall(CallInfo &callInfo, JSFunction *target)
loopDepth_);
if (!inlineBuilder.buildInline(this, outerResumePoint, callInfo)) {
if (analysisContext && analysisContext->isExceptionPending()) {
IonSpew(IonSpew_Abort, "Inline builder raised exception.");
JitSpew(JitSpew_Abort, "Inline builder raised exception.");
abortReason_ = AbortReason_Error;
return false;
}
@ -8568,7 +8568,7 @@ IonBuilder::annotateGetPropertyCache(MDefinition *obj, MGetPropertyCache *getPro
#ifdef DEBUG
if (inlinePropTable->numEntries() > 0)
IonSpew(IonSpew_Inlining, "Annotated GetPropertyCache with %d/%d inline cases",
JitSpew(JitSpew_Inlining, "Annotated GetPropertyCache with %d/%d inline cases",
(int) inlinePropTable->numEntries(), (int) objCount);
#endif

View File

@ -15,8 +15,8 @@
#include "jit/BaselineIC.h"
#include "jit/Ion.h"
#include "jit/IonLinker.h"
#include "jit/IonSpewer.h"
#include "jit/JitcodeMap.h"
#include "jit/JitSpewer.h"
#include "jit/Lowering.h"
#ifdef JS_ION_PERF
# include "jit/PerfSpewer.h"
@ -416,11 +416,11 @@ IonCache::linkAndAttachStub(JSContext *cx, MacroAssembler &masm, StubAttacher &a
}
if (pc_) {
IonSpew(IonSpew_InlineCaches, "Cache %p(%s:%d/%d) generated %s %s stub at %p",
JitSpew(JitSpew_InlineCaches, "Cache %p(%s:%d/%d) generated %s %s stub at %p",
this, script_->filename(), script_->lineno(), script_->pcToOffset(pc_),
attachKind, CacheName(kind()), code->raw());
} else {
IonSpew(IonSpew_InlineCaches, "Cache %p generated %s %s stub at %p",
JitSpew(JitSpew_InlineCaches, "Cache %p generated %s %s stub at %p",
this, attachKind, CacheName(kind()), code->raw());
}
@ -1753,7 +1753,7 @@ GetPropertyIC::update(JSContext *cx, size_t cacheIndex,
// 2) There's no need to dynamically monitor the return type. This would
// be complicated since (due to GVN) there can be multiple pc's
// associated with a single idempotent cache.
IonSpew(IonSpew_InlineCaches, "Invalidating from idempotent cache %s:%d",
JitSpew(JitSpew_InlineCaches, "Invalidating from idempotent cache %s:%d",
outerScript->filename(), outerScript->lineno());
outerScript->setInvalidatedIdempotentCache();
@ -3025,7 +3025,7 @@ GetElementIC::attachGetProp(JSContext *cx, HandleScript outerScript, IonScript *
output().hasValue());
if (!cacheable) {
IonSpew(IonSpew_InlineCaches, "GETELEM uncacheable property");
JitSpew(JitSpew_InlineCaches, "GETELEM uncacheable property");
return true;
}
@ -3505,7 +3505,7 @@ GetElementIC::update(JSContext *cx, size_t cacheIndex, HandleObject obj,
if (!attachedStub) {
cache.incFailedUpdates();
if (cache.shouldDisable()) {
IonSpew(IonSpew_InlineCaches, "Disable inline cache");
JitSpew(JitSpew_InlineCaches, "Disable inline cache");
cache.disable();
}
} else {
@ -4171,7 +4171,7 @@ IsCacheableNonGlobalScopeChain(JSObject *scopeChain, JSObject *holder)
{
while (true) {
if (!IsCacheableNonGlobalScope(scopeChain)) {
IonSpew(IonSpew_InlineCaches, "Non-cacheable object on scope chain");
JitSpew(JitSpew_InlineCaches, "Non-cacheable object on scope chain");
return false;
}
@ -4180,7 +4180,7 @@ IsCacheableNonGlobalScopeChain(JSObject *scopeChain, JSObject *holder)
scopeChain = &scopeChain->as<ScopeObject>().enclosingScope();
if (!scopeChain) {
IonSpew(IonSpew_InlineCaches, "Scope chain indirect hit");
JitSpew(JitSpew_InlineCaches, "Scope chain indirect hit");
return false;
}
}
@ -4214,7 +4214,7 @@ BindNameIC::update(JSContext *cx, size_t cacheIndex, HandleObject scopeChain)
if (!cache.attachNonGlobal(cx, outerScript, ion, scopeChain, holder))
return nullptr;
} else {
IonSpew(IonSpew_InlineCaches, "BINDNAME uncacheable scope chain");
JitSpew(JitSpew_InlineCaches, "BINDNAME uncacheable scope chain");
}
}

View File

@ -18,9 +18,9 @@
#include "jit/BaselineJIT.h"
#include "jit/Ion.h"
#include "jit/IonMacroAssembler.h"
#include "jit/IonSpewer.h"
#include "jit/JitcodeMap.h"
#include "jit/JitCompartment.h"
#include "jit/JitSpewer.h"
#include "jit/ParallelFunctions.h"
#include "jit/PcScriptCache.h"
#include "jit/Recover.h"
@ -628,7 +628,7 @@ HandleException(ResumeFromException *rfe)
rfe->kind = ResumeFromException::RESUME_ENTRY_FRAME;
IonSpew(IonSpew_Invalidate, "handling exception");
JitSpew(JitSpew_Invalidate, "handling exception");
// Clear any Ion return override that's been set.
// This may happen if a callVM function causes an invalidation (setting the
@ -1360,7 +1360,7 @@ void UpdateJitActivationsForMinorGC<gc::ForkJoinNursery>(PerThreadData *ptd, JST
void
GetPcScript(JSContext *cx, JSScript **scriptRes, jsbytecode **pcRes)
{
IonSpew(IonSpew_Snapshots, "Recover PC & Script from the last frame.");
JitSpew(JitSpew_Snapshots, "Recover PC & Script from the last frame.");
JSRuntime *rt = cx->runtime();
@ -2264,7 +2264,7 @@ JitFrameIterator::verifyReturnAddressUsingNativeToBytecodeMap()
if (!jitrt->getJitcodeGlobalTable()->lookup(returnAddressToFp_, &entry))
return true;
IonSpew(IonSpew_Profiling, "Found nativeToBytecode entry for %p: %p - %p",
JitSpew(JitSpew_Profiling, "Found nativeToBytecode entry for %p: %p - %p",
returnAddressToFp_, entry.nativeStartAddr(), entry.nativeEndAddr());
JitcodeGlobalEntry::BytecodeLocationVector location;
@ -2274,9 +2274,9 @@ JitFrameIterator::verifyReturnAddressUsingNativeToBytecodeMap()
JS_ASSERT(depth > 0 && depth != UINT32_MAX);
JS_ASSERT(location.length() == depth);
IonSpew(IonSpew_Profiling, "Found bytecode location of depth %d:", depth);
JitSpew(JitSpew_Profiling, "Found bytecode location of depth %d:", depth);
for (size_t i = 0; i < location.length(); i++) {
IonSpew(IonSpew_Profiling, " %s:%d - %d",
JitSpew(JitSpew_Profiling, " %s:%d - %d",
location[i].script->filename(), location[i].script->lineno(),
(int) (location[i].pc - location[i].script->code()));
}
@ -2288,7 +2288,7 @@ JitFrameIterator::verifyReturnAddressUsingNativeToBytecodeMap()
JS_ASSERT(idx < location.length());
JS_ASSERT_IF(idx < location.length() - 1, inlineFrames.more());
IonSpew(IonSpew_Profiling, "Match %d: ION %s:%d(%d) vs N2B %s:%d(%d)",
JitSpew(JitSpew_Profiling, "Match %d: ION %s:%d(%d) vs N2B %s:%d(%d)",
(int)idx,
inlineFrames.script()->filename(),
inlineFrames.script()->lineno(),

View File

@ -6,20 +6,20 @@
#ifdef DEBUG
#include "jit/IonSpewer.h"
#include "jit/JitSpewer.h"
#include "jit/Ion.h"
#include "jit/MIR.h"
#include "vm/HelperThreads.h"
#ifndef ION_SPEW_DIR
#ifndef JIT_SPEW_DIR
# if defined(_WIN32)
# define ION_SPEW_DIR ""
# define JIT_SPEW_DIR ""
# elif defined(__ANDROID__)
# define ION_SPEW_DIR "/data/local/tmp/"
# define JIT_SPEW_DIR "/data/local/tmp/"
# else
# define ION_SPEW_DIR "/tmp/"
# define JIT_SPEW_DIR "/tmp/"
# endif
#endif
@ -35,9 +35,9 @@ static uint32_t filteredOutCompilations = 0;
static const char * const ChannelNames[] =
{
#define IONSPEW_CHANNEL(name) #name,
IONSPEW_CHANNEL_LIST(IONSPEW_CHANNEL)
#undef IONSPEW_CHANNEL
#define JITSPEW_CHANNEL(name) #name,
JITSPEW_CHANNEL_LIST(JITSPEW_CHANNEL)
#undef JITSPEW_CHANNEL
};
static bool
@ -75,7 +75,7 @@ FilterContainsLocation(HandleScript function)
void
jit::EnableIonDebugLogging()
{
EnableChannel(IonSpew_Logs);
EnableChannel(JitSpew_Logs);
ionspewer.init();
}
@ -123,9 +123,9 @@ IonSpewer::init()
if (inited_)
return true;
if (!c1Spewer.init(ION_SPEW_DIR "ion.cfg"))
if (!c1Spewer.init(JIT_SPEW_DIR "ion.cfg"))
return false;
if (!jsonSpewer.init(ION_SPEW_DIR "ion.json"))
if (!jsonSpewer.init(JIT_SPEW_DIR "ion.json"))
return false;
inited_ = true;
@ -203,7 +203,7 @@ IonSpewer::endFunction()
}
FILE *jit::IonSpewFile = nullptr;
FILE *jit::JitSpewFile = nullptr;
static bool
ContainsFlag(const char *str, const char *flag)
@ -271,178 +271,178 @@ jit::CheckLogging()
/*NOTREACHED*/
}
if (ContainsFlag(env, "aborts"))
EnableChannel(IonSpew_Abort);
EnableChannel(JitSpew_Abort);
if (ContainsFlag(env, "escape"))
EnableChannel(IonSpew_Escape);
EnableChannel(JitSpew_Escape);
if (ContainsFlag(env, "alias"))
EnableChannel(IonSpew_Alias);
EnableChannel(JitSpew_Alias);
if (ContainsFlag(env, "scripts"))
EnableChannel(IonSpew_Scripts);
EnableChannel(JitSpew_Scripts);
if (ContainsFlag(env, "mir"))
EnableChannel(IonSpew_MIR);
EnableChannel(JitSpew_MIR);
if (ContainsFlag(env, "gvn"))
EnableChannel(IonSpew_GVN);
EnableChannel(JitSpew_GVN);
if (ContainsFlag(env, "range"))
EnableChannel(IonSpew_Range);
EnableChannel(JitSpew_Range);
if (ContainsFlag(env, "unroll"))
EnableChannel(IonSpew_Unrolling);
EnableChannel(JitSpew_Unrolling);
if (ContainsFlag(env, "licm"))
EnableChannel(IonSpew_LICM);
EnableChannel(JitSpew_LICM);
if (ContainsFlag(env, "regalloc"))
EnableChannel(IonSpew_RegAlloc);
EnableChannel(JitSpew_RegAlloc);
if (ContainsFlag(env, "inline"))
EnableChannel(IonSpew_Inlining);
EnableChannel(JitSpew_Inlining);
if (ContainsFlag(env, "snapshots"))
EnableChannel(IonSpew_Snapshots);
EnableChannel(JitSpew_Snapshots);
if (ContainsFlag(env, "codegen"))
EnableChannel(IonSpew_Codegen);
EnableChannel(JitSpew_Codegen);
if (ContainsFlag(env, "bailouts"))
EnableChannel(IonSpew_Bailouts);
EnableChannel(JitSpew_Bailouts);
if (ContainsFlag(env, "osi"))
EnableChannel(IonSpew_Invalidate);
EnableChannel(JitSpew_Invalidate);
if (ContainsFlag(env, "caches"))
EnableChannel(IonSpew_InlineCaches);
EnableChannel(JitSpew_InlineCaches);
if (ContainsFlag(env, "safepoints"))
EnableChannel(IonSpew_Safepoints);
EnableChannel(JitSpew_Safepoints);
if (ContainsFlag(env, "pools"))
EnableChannel(IonSpew_Pools);
EnableChannel(JitSpew_Pools);
if (ContainsFlag(env, "cacheflush"))
EnableChannel(IonSpew_CacheFlush);
EnableChannel(JitSpew_CacheFlush);
if (ContainsFlag(env, "logs"))
EnableIonDebugLogging();
if (ContainsFlag(env, "profiling"))
EnableChannel(IonSpew_Profiling);
EnableChannel(JitSpew_Profiling);
if (ContainsFlag(env, "all"))
LoggingBits = uint32_t(-1);
if (ContainsFlag(env, "bl-aborts"))
EnableChannel(IonSpew_BaselineAbort);
EnableChannel(JitSpew_BaselineAbort);
if (ContainsFlag(env, "bl-scripts"))
EnableChannel(IonSpew_BaselineScripts);
EnableChannel(JitSpew_BaselineScripts);
if (ContainsFlag(env, "bl-op"))
EnableChannel(IonSpew_BaselineOp);
EnableChannel(JitSpew_BaselineOp);
if (ContainsFlag(env, "bl-ic"))
EnableChannel(IonSpew_BaselineIC);
EnableChannel(JitSpew_BaselineIC);
if (ContainsFlag(env, "bl-ic-fb"))
EnableChannel(IonSpew_BaselineICFallback);
EnableChannel(JitSpew_BaselineICFallback);
if (ContainsFlag(env, "bl-osr"))
EnableChannel(IonSpew_BaselineOSR);
EnableChannel(JitSpew_BaselineOSR);
if (ContainsFlag(env, "bl-bails"))
EnableChannel(IonSpew_BaselineBailouts);
EnableChannel(JitSpew_BaselineBailouts);
if (ContainsFlag(env, "bl-dbg-osr"))
EnableChannel(IonSpew_BaselineDebugModeOSR);
EnableChannel(JitSpew_BaselineDebugModeOSR);
if (ContainsFlag(env, "bl-all")) {
EnableChannel(IonSpew_BaselineAbort);
EnableChannel(IonSpew_BaselineScripts);
EnableChannel(IonSpew_BaselineOp);
EnableChannel(IonSpew_BaselineIC);
EnableChannel(IonSpew_BaselineICFallback);
EnableChannel(IonSpew_BaselineOSR);
EnableChannel(IonSpew_BaselineBailouts);
EnableChannel(IonSpew_BaselineDebugModeOSR);
EnableChannel(JitSpew_BaselineAbort);
EnableChannel(JitSpew_BaselineScripts);
EnableChannel(JitSpew_BaselineOp);
EnableChannel(JitSpew_BaselineIC);
EnableChannel(JitSpew_BaselineICFallback);
EnableChannel(JitSpew_BaselineOSR);
EnableChannel(JitSpew_BaselineBailouts);
EnableChannel(JitSpew_BaselineDebugModeOSR);
}
IonSpewFile = stderr;
JitSpewFile = stderr;
}
void
jit::IonSpewStartVA(IonSpewChannel channel, const char *fmt, va_list ap)
jit::JitSpewStartVA(JitSpewChannel channel, const char *fmt, va_list ap)
{
if (!IonSpewEnabled(channel))
if (!JitSpewEnabled(channel))
return;
IonSpewHeader(channel);
JitSpewHeader(channel);
vfprintf(stderr, fmt, ap);
}
void
jit::IonSpewContVA(IonSpewChannel channel, const char *fmt, va_list ap)
jit::JitSpewContVA(JitSpewChannel channel, const char *fmt, va_list ap)
{
if (!IonSpewEnabled(channel))
if (!JitSpewEnabled(channel))
return;
vfprintf(stderr, fmt, ap);
}
void
jit::IonSpewFin(IonSpewChannel channel)
jit::JitSpewFin(JitSpewChannel channel)
{
if (!IonSpewEnabled(channel))
if (!JitSpewEnabled(channel))
return;
fprintf(stderr, "\n");
}
void
jit::IonSpewVA(IonSpewChannel channel, const char *fmt, va_list ap)
jit::JitSpewVA(JitSpewChannel channel, const char *fmt, va_list ap)
{
IonSpewStartVA(channel, fmt, ap);
IonSpewFin(channel);
JitSpewStartVA(channel, fmt, ap);
JitSpewFin(channel);
}
void
jit::IonSpew(IonSpewChannel channel, const char *fmt, ...)
jit::JitSpew(JitSpewChannel channel, const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
IonSpewVA(channel, fmt, ap);
JitSpewVA(channel, fmt, ap);
va_end(ap);
}
void
jit::IonSpewDef(IonSpewChannel channel, const char *str, MDefinition *def)
jit::JitSpewDef(JitSpewChannel channel, const char *str, MDefinition *def)
{
if (!IonSpewEnabled(channel))
if (!JitSpewEnabled(channel))
return;
IonSpewHeader(channel);
fprintf(IonSpewFile, "%s", str);
def->dump(IonSpewFile);
def->dumpLocation(IonSpewFile);
JitSpewHeader(channel);
fprintf(JitSpewFile, "%s", str);
def->dump(JitSpewFile);
def->dumpLocation(JitSpewFile);
}
void
jit::IonSpewStart(IonSpewChannel channel, const char *fmt, ...)
jit::JitSpewStart(JitSpewChannel channel, const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
IonSpewStartVA(channel, fmt, ap);
JitSpewStartVA(channel, fmt, ap);
va_end(ap);
}
void
jit::IonSpewCont(IonSpewChannel channel, const char *fmt, ...)
jit::JitSpewCont(JitSpewChannel channel, const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
IonSpewContVA(channel, fmt, ap);
JitSpewContVA(channel, fmt, ap);
va_end(ap);
}
void
jit::IonSpewHeader(IonSpewChannel channel)
jit::JitSpewHeader(JitSpewChannel channel)
{
if (!IonSpewEnabled(channel))
if (!JitSpewEnabled(channel))
return;
fprintf(stderr, "[%s] ", ChannelNames[channel]);
}
bool
jit::IonSpewEnabled(IonSpewChannel channel)
jit::JitSpewEnabled(JitSpewChannel channel)
{
JS_ASSERT(LoggingChecked);
return (LoggingBits & (1 << uint32_t(channel))) && !filteredOutCompilations;
}
void
jit::EnableChannel(IonSpewChannel channel)
jit::EnableChannel(JitSpewChannel channel)
{
JS_ASSERT(LoggingChecked);
LoggingBits |= (1 << uint32_t(channel));
}
void
jit::DisableChannel(IonSpewChannel channel)
jit::DisableChannel(JitSpewChannel channel)
{
JS_ASSERT(LoggingChecked);
LoggingBits &= ~(1 << uint32_t(channel));

View File

@ -4,8 +4,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef jit_IonSpewer_h
#define jit_IonSpewer_h
#ifndef jit_JitSpewer_h
#define jit_JitSpewer_h
#include "mozilla/DebugOnly.h"
@ -19,7 +19,7 @@ namespace js {
namespace jit {
// New channels may be added below.
#define IONSPEW_CHANNEL_LIST(_) \
#define JITSPEW_CHANNEL_LIST(_) \
/* Used to abort SSA construction */ \
_(Abort) \
/* Information about compiled scripts */\
@ -83,15 +83,15 @@ namespace jit {
_(BaselineDebugModeOSR)
enum IonSpewChannel {
#define IONSPEW_CHANNEL(name) IonSpew_##name,
IONSPEW_CHANNEL_LIST(IONSPEW_CHANNEL)
#undef IONSPEW_CHANNEL
IonSpew_Terminator
enum JitSpewChannel {
#define JITSPEW_CHANNEL(name) JitSpew_##name,
JITSPEW_CHANNEL_LIST(JITSPEW_CHANNEL)
#undef JITSPEW_CHANNEL
JitSpew_Terminator
};
// The IonSpewer is only available on debug builds.
// The JitSpewer is only available on debug builds.
// None of the global functions have effect on non-debug builds.
static const int NULL_ID = -1;
@ -134,20 +134,20 @@ void IonSpewPass(const char *pass, LinearScanAllocator *ra);
void IonSpewEndFunction();
void CheckLogging();
extern FILE *IonSpewFile;
void IonSpew(IonSpewChannel channel, const char *fmt, ...);
void IonSpewStart(IonSpewChannel channel, const char *fmt, ...);
void IonSpewCont(IonSpewChannel channel, const char *fmt, ...);
void IonSpewFin(IonSpewChannel channel);
void IonSpewHeader(IonSpewChannel channel);
bool IonSpewEnabled(IonSpewChannel channel);
void IonSpewVA(IonSpewChannel channel, const char *fmt, va_list ap);
void IonSpewStartVA(IonSpewChannel channel, const char *fmt, va_list ap);
void IonSpewContVA(IonSpewChannel channel, const char *fmt, va_list ap);
void IonSpewDef(IonSpewChannel channel, const char *str, MDefinition *def);
extern FILE *JitSpewFile;
void JitSpew(JitSpewChannel channel, const char *fmt, ...);
void JitSpewStart(JitSpewChannel channel, const char *fmt, ...);
void JitSpewCont(JitSpewChannel channel, const char *fmt, ...);
void JitSpewFin(JitSpewChannel channel);
void JitSpewHeader(JitSpewChannel channel);
bool JitSpewEnabled(JitSpewChannel channel);
void JitSpewVA(JitSpewChannel channel, const char *fmt, va_list ap);
void JitSpewStartVA(JitSpewChannel channel, const char *fmt, va_list ap);
void JitSpewContVA(JitSpewChannel channel, const char *fmt, va_list ap);
void JitSpewDef(JitSpewChannel channel, const char *str, MDefinition *def);
void EnableChannel(IonSpewChannel channel);
void DisableChannel(IonSpewChannel channel);
void EnableChannel(JitSpewChannel channel);
void DisableChannel(JitSpewChannel channel);
void EnableIonDebugLogging();
#else
@ -163,42 +163,42 @@ static inline void IonSpewEndFunction()
static inline void CheckLogging()
{ }
static FILE *const IonSpewFile = nullptr;
static inline void IonSpew(IonSpewChannel, const char *fmt, ...)
static FILE *const JitSpewFile = nullptr;
static inline void JitSpew(JitSpewChannel, const char *fmt, ...)
{ }
static inline void IonSpewStart(IonSpewChannel channel, const char *fmt, ...)
static inline void JitSpewStart(JitSpewChannel channel, const char *fmt, ...)
{ }
static inline void IonSpewCont(IonSpewChannel channel, const char *fmt, ...)
static inline void JitSpewCont(JitSpewChannel channel, const char *fmt, ...)
{ }
static inline void IonSpewFin(IonSpewChannel channel)
static inline void JitSpewFin(JitSpewChannel channel)
{ }
static inline void IonSpewHeader(IonSpewChannel channel)
static inline void JitSpewHeader(JitSpewChannel channel)
{ }
static inline bool IonSpewEnabled(IonSpewChannel channel)
static inline bool JitSpewEnabled(JitSpewChannel channel)
{ return false; }
static inline void IonSpewVA(IonSpewChannel channel, const char *fmt, va_list ap)
static inline void JitSpewVA(JitSpewChannel channel, const char *fmt, va_list ap)
{ }
static inline void IonSpewDef(IonSpewChannel channel, const char *str, MDefinition *def)
static inline void JitSpewDef(JitSpewChannel channel, const char *str, MDefinition *def)
{ }
static inline void EnableChannel(IonSpewChannel)
static inline void EnableChannel(JitSpewChannel)
{ }
static inline void DisableChannel(IonSpewChannel)
static inline void DisableChannel(JitSpewChannel)
{ }
static inline void EnableIonDebugLogging()
{ }
#endif /* DEBUG */
template <IonSpewChannel Channel>
template <JitSpewChannel Channel>
class AutoDisableSpew
{
mozilla::DebugOnly<bool> enabled_;
public:
AutoDisableSpew()
: enabled_(IonSpewEnabled(Channel))
: enabled_(JitSpewEnabled(Channel))
{
DisableChannel(Channel);
}
@ -215,4 +215,4 @@ class AutoDisableSpew
} /* ion */
} /* js */
#endif /* jit_IonSpewer_h */
#endif /* jit_JitSpewer_h */

View File

@ -8,7 +8,7 @@
#include "mozilla/DebugOnly.h"
#include "jit/BaselineJIT.h"
#include "jit/IonSpewer.h"
#include "jit/JitSpewer.h"
#include "js/Vector.h"
@ -385,7 +385,7 @@ struct JitcodeMapBufferWriteSpewer
else
buffer[bytes*3 - 1] = '\0';
IonSpew(IonSpew_Profiling, "%s@%d[%d bytes] - %s", name, int(startPos), int(bytes), buffer);
JitSpew(JitSpew_Profiling, "%s@%d[%d bytes] - %s", name, int(startPos), int(bytes), buffer);
// Move to the end of the current buffer.
startPos = writer->length();
@ -413,7 +413,7 @@ JitcodeRegionEntry::WriteRun(CompactBufferWriter &writer,
JitcodeMapBufferWriteSpewer spewer(writer);
// Write the head info.
IonSpew(IonSpew_Profiling, " Head Info: nativeOffset=%d scriptDepth=%d",
JitSpew(JitSpew_Profiling, " Head Info: nativeOffset=%d scriptDepth=%d",
int(regionNativeOffset), int(scriptDepth));
WriteHead(writer, regionNativeOffset, scriptDepth);
spewer.spewAndAdvance(" ");
@ -434,7 +434,7 @@ JitcodeRegionEntry::WriteRun(CompactBufferWriter &writer,
uint32_t pcOffset = curTree->script()->pcToOffset(curPc);
IonSpew(IonSpew_Profiling, " Script/PC %d: scriptIdx=%d pcOffset=%d",
JitSpew(JitSpew_Profiling, " Script/PC %d: scriptIdx=%d pcOffset=%d",
int(i), int(scriptIdx), int(pcOffset));
WriteScriptPc(writer, scriptIdx, pcOffset);
spewer.spewAndAdvance(" ");
@ -449,7 +449,7 @@ JitcodeRegionEntry::WriteRun(CompactBufferWriter &writer,
uint32_t curNativeOffset = entry->nativeOffset.offset();
uint32_t curBytecodeOffset = entry->tree->script()->pcToOffset(entry->pc);
IonSpew(IonSpew_Profiling, " Writing Delta Run from nativeOffset=%d bytecodeOffset=%d",
JitSpew(JitSpew_Profiling, " Writing Delta Run from nativeOffset=%d bytecodeOffset=%d",
int(curNativeOffset), int(curBytecodeOffset));
// Skip first entry because it is implicit in the header. Start at subsequent entry.
@ -464,22 +464,22 @@ JitcodeRegionEntry::WriteRun(CompactBufferWriter &writer,
int32_t bytecodeDelta = int32_t(nextBytecodeOffset) - int32_t(curBytecodeOffset);
JS_ASSERT(IsDeltaEncodeable(nativeDelta, bytecodeDelta));
IonSpew(IonSpew_Profiling, " RunEntry native: %d-%d [%d] bytecode: %d-%d [%d]",
JitSpew(JitSpew_Profiling, " RunEntry native: %d-%d [%d] bytecode: %d-%d [%d]",
int(curNativeOffset), int(nextNativeOffset), int(nativeDelta),
int(curBytecodeOffset), int(nextBytecodeOffset), int(bytecodeDelta));
WriteDelta(writer, nativeDelta, bytecodeDelta);
// Spew the bytecode in these ranges.
if (curBytecodeOffset < nextBytecodeOffset) {
IonSpewStart(IonSpew_Profiling, " OPS: ");
JitSpewStart(JitSpew_Profiling, " OPS: ");
uint32_t curBc = curBytecodeOffset;
while (curBc < nextBytecodeOffset) {
jsbytecode *pc = entry[i].tree->script()->offsetToPC(curBc);
JSOp op = JSOp(*pc);
IonSpewCont(IonSpew_Profiling, "%s ", js_CodeName[op]);
JitSpewCont(JitSpew_Profiling, "%s ", js_CodeName[op]);
curBc += GetBytecodeLength(pc);
}
IonSpewFin(IonSpew_Profiling);
JitSpewFin(JitSpew_Profiling);
}
spewer.spewAndAdvance(" ");
@ -626,13 +626,13 @@ JitcodeIonTable::WriteIonTable(CompactBufferWriter &writer,
JS_ASSERT(writer.length() == 0);
JS_ASSERT(scriptListSize > 0);
IonSpew(IonSpew_Profiling, "Writing native to bytecode map for %s:%d (%d entries)",
JitSpew(JitSpew_Profiling, "Writing native to bytecode map for %s:%d (%d entries)",
scriptList[0]->filename(), scriptList[0]->lineno(),
int(end - start));
IonSpew(IonSpew_Profiling, " ScriptList of size %d", int(scriptListSize));
JitSpew(JitSpew_Profiling, " ScriptList of size %d", int(scriptListSize));
for (uint32_t i = 0; i < scriptListSize; i++) {
IonSpew(IonSpew_Profiling, " Script %d - %s:%d",
JitSpew(JitSpew_Profiling, " Script %d - %s:%d",
int(i), scriptList[i]->filename(), int(scriptList[i]->lineno()));
}
@ -646,7 +646,7 @@ JitcodeIonTable::WriteIonTable(CompactBufferWriter &writer,
uint32_t runLength = JitcodeRegionEntry::ExpectedRunLength(curEntry, end);
JS_ASSERT(runLength > 0);
JS_ASSERT(runLength <= (end - curEntry));
IonSpew(IonSpew_Profiling, " Run at entry %d, length %d, buffer offset %d",
JitSpew(JitSpew_Profiling, " Run at entry %d, length %d, buffer offset %d",
int(curEntry - start), int(runLength), int(writer.length()));
// Store the offset of the run.
@ -665,7 +665,7 @@ JitcodeIonTable::WriteIonTable(CompactBufferWriter &writer,
uint32_t padding = sizeof(uint32_t) - (writer.length() % sizeof(uint32_t));
if (padding == sizeof(uint32_t))
padding = 0;
IonSpew(IonSpew_Profiling, " Padding %d bytes after run @%d",
JitSpew(JitSpew_Profiling, " Padding %d bytes after run @%d",
int(padding), int(writer.length()));
for (uint32_t i = 0; i < padding; i++)
writer.writeByte(0);
@ -677,14 +677,14 @@ JitcodeIonTable::WriteIonTable(CompactBufferWriter &writer,
// pointers, so all writes below use native endianness.
// Write out numRegions
IonSpew(IonSpew_Profiling, " Writing numRuns=%d", int(runOffsets.length()));
JitSpew(JitSpew_Profiling, " Writing numRuns=%d", int(runOffsets.length()));
writer.writeNativeEndianUint32_t(runOffsets.length());
// Write out region offset table. The offsets in |runOffsets| are currently forward
// offsets from the beginning of the buffer. We convert them to backwards offsets
// from the start of the table before writing them into their table entries.
for (uint32_t i = 0; i < runOffsets.length(); i++) {
IonSpew(IonSpew_Profiling, " Run %d offset=%d backOffset=%d @%d",
JitSpew(JitSpew_Profiling, " Run %d offset=%d backOffset=%d @%d",
int(i), int(runOffsets[i]), int(tableOffset - runOffsets[i]), int(writer.length()));
writer.writeNativeEndianUint32_t(tableOffset - runOffsets[i]);
}

View File

@ -7,7 +7,7 @@
#include "jit/LICM.h"
#include "jit/IonAnalysis.h"
#include "jit/IonSpewer.h"
#include "jit/JitSpewer.h"
#include "jit/MIRGenerator.h"
#include "jit/MIRGraph.h"
@ -27,7 +27,7 @@ LoopContainsPossibleCall(MIRGraph &graph, MBasicBlock *header, MBasicBlock *back
for (auto insIter(block->begin()), insEnd(block->end()); insIter != insEnd; ++insIter) {
MInstruction *ins = *insIter;
if (ins->possiblyCalls()) {
IonSpew(IonSpew_LICM, " Possile call found at %s%u", ins->opName(), ins->id());
JitSpew(JitSpew_LICM, " Possile call found at %s%u", ins->opName(), ins->id());
return true;
}
}
@ -152,7 +152,7 @@ MoveDeferredOperands(MInstruction *ins, MInstruction *hoistPoint, bool hasCalls)
// because we require RequiresHoistedUse to be set at each level.
MoveDeferredOperands(opIns, hoistPoint, hasCalls);
IonSpew(IonSpew_LICM, " Hoisting %s%u (now that a user will be hoisted)",
JitSpew(JitSpew_LICM, " Hoisting %s%u (now that a user will be hoisted)",
opIns->opName(), opIns->id());
opIns->block()->moveBefore(hoistPoint, opIns);
@ -168,7 +168,7 @@ VisitLoopBlock(MBasicBlock *block, MBasicBlock *header, MInstruction *hoistPoint
if (!IsHoistable(ins, header, hasCalls)) {
#ifdef DEBUG
if (IsHoistableIgnoringDependency(ins, hasCalls)) {
IonSpew(IonSpew_LICM, " %s%u isn't hoistable due to dependency on %s%u",
JitSpew(JitSpew_LICM, " %s%u isn't hoistable due to dependency on %s%u",
ins->opName(), ins->id(),
ins->dependency()->opName(), ins->dependency()->id());
}
@ -180,7 +180,7 @@ VisitLoopBlock(MBasicBlock *block, MBasicBlock *header, MInstruction *hoistPoint
// its uses. We want those instructions as close as possible to their
// use, to minimize register pressure.
if (RequiresHoistedUse(ins, hasCalls)) {
IonSpew(IonSpew_LICM, " %s%u will be hoisted only if its users are",
JitSpew(JitSpew_LICM, " %s%u will be hoisted only if its users are",
ins->opName(), ins->id());
continue;
}
@ -188,7 +188,7 @@ VisitLoopBlock(MBasicBlock *block, MBasicBlock *header, MInstruction *hoistPoint
// Hoist operands which were too cheap to hoist on their own.
MoveDeferredOperands(ins, hoistPoint, hasCalls);
IonSpew(IonSpew_LICM, " Hoisting %s%u", ins->opName(), ins->id());
JitSpew(JitSpew_LICM, " Hoisting %s%u", ins->opName(), ins->id());
// Move the instruction to the hoistPoint.
block->moveBefore(hoistPoint, ins);
@ -200,7 +200,7 @@ VisitLoop(MIRGraph &graph, MBasicBlock *header)
{
MInstruction *hoistPoint = header->loopPredecessor()->lastIns();
IonSpew(IonSpew_LICM, " Visiting loop with header block%u, hoisting to %s%u",
JitSpew(JitSpew_LICM, " Visiting loop with header block%u, hoisting to %s%u",
header->id(), hoistPoint->opName(), hoistPoint->id());
MBasicBlock *backedge = header->backedge();
@ -227,7 +227,7 @@ VisitLoop(MIRGraph &graph, MBasicBlock *header)
bool
jit::LICM(MIRGenerator *mir, MIRGraph &graph)
{
IonSpew(IonSpew_LICM, "Beginning LICM pass");
JitSpew(JitSpew_LICM, "Beginning LICM pass");
// Iterate in RPO to visit outer loops before inner loops. We'd hoist the
// same things either way, but outer first means we do a little less work.
@ -245,7 +245,7 @@ jit::LICM(MIRGenerator *mir, MIRGraph &graph)
if (!canOsr)
VisitLoop(graph, header);
else
IonSpew(IonSpew_LICM, " Skipping loop with header block%u due to OSR", header->id());
JitSpew(JitSpew_LICM, " Skipping loop with header block%u due to OSR", header->id());
UnmarkLoopBlocks(graph, header);

View File

@ -10,7 +10,7 @@
#include "jsprf.h"
#include "jit/IonSpewer.h"
#include "jit/JitSpewer.h"
#include "jit/MIR.h"
#include "jit/MIRGenerator.h"
@ -201,7 +201,7 @@ LRecoverInfo::New(MIRGenerator *gen, MResumePoint *mir)
if (!recoverInfo || !recoverInfo->init(mir))
return nullptr;
IonSpew(IonSpew_Snapshots, "Generating LIR recover info %p from MIR (%p)",
JitSpew(JitSpew_Snapshots, "Generating LIR recover info %p from MIR (%p)",
(void *)recoverInfo, (void *)mir);
return recoverInfo;
@ -293,7 +293,7 @@ LSnapshot::New(MIRGenerator *gen, LRecoverInfo *recover, BailoutKind kind)
if (!snapshot || !snapshot->init(gen))
return nullptr;
IonSpew(IonSpew_Snapshots, "Generating LIR snapshot %p from recover (%p)",
JitSpew(JitSpew_Snapshots, "Generating LIR snapshot %p from recover (%p)",
(void *)snapshot, (void *)recover);
return snapshot;
@ -475,12 +475,12 @@ LInstruction::assignSnapshot(LSnapshot *snapshot)
snapshot_ = snapshot;
#ifdef DEBUG
if (IonSpewEnabled(IonSpew_Snapshots)) {
IonSpewHeader(IonSpew_Snapshots);
fprintf(IonSpewFile, "Assigning snapshot %p to instruction %p (",
if (JitSpewEnabled(JitSpew_Snapshots)) {
JitSpewHeader(JitSpew_Snapshots);
fprintf(JitSpewFile, "Assigning snapshot %p to instruction %p (",
(void *)snapshot, (void *)this);
printName(IonSpewFile);
fprintf(IonSpewFile, ")\n");
printName(JitSpewFile);
fprintf(JitSpewFile, ")\n");
}
#endif
}

View File

@ -9,7 +9,7 @@
#include "mozilla/DebugOnly.h"
#include "jit/BitSet.h"
#include "jit/IonSpewer.h"
#include "jit/JitSpewer.h"
using namespace js;
using namespace js::jit;
@ -94,7 +94,7 @@ LinearScanAllocator::allocateRegisters()
const Requirement *req = current->requirement();
const Requirement *hint = current->hint();
IonSpew(IonSpew_RegAlloc, "Processing %d = [%u, %u] (pri=%d)",
JitSpew(JitSpew_RegAlloc, "Processing %d = [%u, %u] (pri=%d)",
current->hasVreg() ? current->vreg() : 0, current->start().bits(),
current->end().bits(), current->requirement()->priority());
@ -148,7 +148,7 @@ LinearScanAllocator::allocateRegisters()
// If we don't really need this in a register, don't allocate one
if (req->kind() != Requirement::REGISTER && hint->kind() == Requirement::NONE) {
IonSpew(IonSpew_RegAlloc, " Eagerly spilling virtual register %d",
JitSpew(JitSpew_RegAlloc, " Eagerly spilling virtual register %d",
current->hasVreg() ? current->vreg() : 0);
if (!spill())
return false;
@ -156,12 +156,12 @@ LinearScanAllocator::allocateRegisters()
}
// Try to allocate a free register
IonSpew(IonSpew_RegAlloc, " Attempting free register allocation");
JitSpew(JitSpew_RegAlloc, " Attempting free register allocation");
CodePosition bestFreeUntil;
AnyRegister::Code bestCode = findBestFreeRegister(&bestFreeUntil);
if (bestCode != AnyRegister::Invalid) {
AnyRegister best = AnyRegister::FromCode(bestCode);
IonSpew(IonSpew_RegAlloc, " Decided best register was %s", best.name());
JitSpew(JitSpew_RegAlloc, " Decided best register was %s", best.name());
// Split when the register is next needed if necessary
if (bestFreeUntil < current->end()) {
@ -174,7 +174,7 @@ LinearScanAllocator::allocateRegisters()
continue;
}
IonSpew(IonSpew_RegAlloc, " Attempting blocked register allocation");
JitSpew(JitSpew_RegAlloc, " Attempting blocked register allocation");
// If we absolutely need a register or our next use is closer than the
// selected blocking register then we spill the blocker. Otherwise, we
@ -185,7 +185,7 @@ LinearScanAllocator::allocateRegisters()
(req->kind() == Requirement::REGISTER || hint->pos() < bestNextUsed))
{
AnyRegister best = AnyRegister::FromCode(bestCode);
IonSpew(IonSpew_RegAlloc, " Decided best register was %s", best.name());
JitSpew(JitSpew_RegAlloc, " Decided best register was %s", best.name());
if (!splitBlockingIntervals(best))
return false;
@ -195,7 +195,7 @@ LinearScanAllocator::allocateRegisters()
continue;
}
IonSpew(IonSpew_RegAlloc, " No registers available to spill");
JitSpew(JitSpew_RegAlloc, " No registers available to spill");
JS_ASSERT(req->kind() == Requirement::NONE);
if (!spill())
@ -667,7 +667,7 @@ LinearScanAllocator::splitInterval(LiveInterval *interval, CodePosition pos)
if (!reg->addInterval(newInterval))
return false;
IonSpew(IonSpew_RegAlloc, " Split interval to %u = [%u, %u]/[%u, %u]",
JitSpew(JitSpew_RegAlloc, " Split interval to %u = [%u, %u]/[%u, %u]",
interval->vreg(), interval->start().bits(),
interval->end().bits(), newInterval->start().bits(),
newInterval->end().bits());
@ -707,7 +707,7 @@ LinearScanAllocator::splitBlockingIntervals(AnyRegister allocatedReg)
if (i->getAllocation()->isRegister() &&
i->getAllocation()->toRegister().aliases(allocatedReg))
{
IonSpew(IonSpew_RegAlloc, " Splitting active interval %u = [%u, %u]",
JitSpew(JitSpew_RegAlloc, " Splitting active interval %u = [%u, %u]",
vregs[i->vreg()].ins()->id(), i->start().bits(), i->end().bits());
JS_ASSERT(i->start() != current->start());
@ -723,7 +723,7 @@ LinearScanAllocator::splitBlockingIntervals(AnyRegister allocatedReg)
if (allocatedReg.numAliased() == 1)
break;
} else {
IonSpew(IonSpew_RegAlloc, " Not touching active interval %u = [%u, %u]",
JitSpew(JitSpew_RegAlloc, " Not touching active interval %u = [%u, %u]",
vregs[i->vreg()].ins()->id(), i->start().bits(), i->end().bits());
i++;
}
@ -733,7 +733,7 @@ LinearScanAllocator::splitBlockingIntervals(AnyRegister allocatedReg)
if (i->getAllocation()->isRegister() &&
i->getAllocation()->toRegister().aliases(allocatedReg))
{
IonSpew(IonSpew_RegAlloc, " Splitting inactive interval %u = [%u, %u]",
JitSpew(JitSpew_RegAlloc, " Splitting inactive interval %u = [%u, %u]",
vregs[i->vreg()].ins()->id(), i->start().bits(), i->end().bits());
LiveInterval *it = *i;
@ -760,7 +760,7 @@ bool
LinearScanAllocator::assign(LAllocation allocation)
{
if (allocation.isRegister())
IonSpew(IonSpew_RegAlloc, "Assigning register %s", allocation.toRegister().name());
JitSpew(JitSpew_RegAlloc, "Assigning register %s", allocation.toRegister().name());
current->setAllocation(allocation);
// Split this interval at the next incompatible one
@ -862,7 +862,7 @@ LinearScanAllocator::allocateSlotFor(const LiveInterval *interval)
bool
LinearScanAllocator::spill()
{
IonSpew(IonSpew_RegAlloc, " Decided to spill current interval");
JitSpew(JitSpew_RegAlloc, " Decided to spill current interval");
// We can't spill bogus intervals
JS_ASSERT(current->hasVreg());
@ -870,7 +870,7 @@ LinearScanAllocator::spill()
LinearScanVirtualRegister *reg = &vregs[current->vreg()];
if (reg->canonicalSpill()) {
IonSpew(IonSpew_RegAlloc, " Allocating canonical spill location");
JitSpew(JitSpew_RegAlloc, " Allocating canonical spill location");
return assign(*reg->canonicalSpill());
}
@ -978,7 +978,7 @@ LinearScanAllocator::finishInterval(LiveInterval *interval)
AnyRegister::Code
LinearScanAllocator::findBestFreeRegister(CodePosition *freeUntil)
{
IonSpew(IonSpew_RegAlloc, " Computing freeUntilPos");
JitSpew(JitSpew_RegAlloc, " Computing freeUntilPos");
// Compute free-until positions for all registers
CodePosition freeUntilPos[AnyRegister::Total];
@ -994,7 +994,7 @@ LinearScanAllocator::findBestFreeRegister(CodePosition *freeUntil)
if (alloc->isRegister(needFloat)) {
AnyRegister reg = alloc->toRegister();
for (size_t a = 0; a < reg.numAliased(); a++) {
IonSpew(IonSpew_RegAlloc, " Register %s not free", reg.aliased(a).name());
JitSpew(JitSpew_RegAlloc, " Register %s not free", reg.aliased(a).name());
freeUntilPos[reg.aliased(a).code()] = CodePosition::MIN;
}
}
@ -1007,7 +1007,7 @@ LinearScanAllocator::findBestFreeRegister(CodePosition *freeUntil)
for (size_t a = 0; a < reg.numAliased(); a++) {
if (pos != CodePosition::MIN && pos < freeUntilPos[reg.aliased(a).code()]) {
freeUntilPos[reg.aliased(a).code()] = pos;
IonSpew(IonSpew_RegAlloc, " Register %s free until %u", reg.aliased(a).name(), pos.bits());
JitSpew(JitSpew_RegAlloc, " Register %s free until %u", reg.aliased(a).name(), pos.bits());
}
}
}
@ -1023,7 +1023,7 @@ LinearScanAllocator::findBestFreeRegister(CodePosition *freeUntil)
CodePosition pos = current->intersect(*i);
if (pos != CodePosition::MIN && pos < freeUntilPos[areg.code()]) {
freeUntilPos[areg.code()] = (pos == current->start()) ? CodePosition::MIN : pos;
IonSpew(IonSpew_RegAlloc, " Register %s free until %u", areg.name(), pos.bits());
JitSpew(JitSpew_RegAlloc, " Register %s free until %u", areg.name(), pos.bits());
}
}
}
@ -1108,7 +1108,7 @@ LinearScanAllocator::findBestFreeRegister(CodePosition *freeUntil)
AnyRegister::Code
LinearScanAllocator::findBestBlockedRegister(CodePosition *nextUsed)
{
IonSpew(IonSpew_RegAlloc, " Computing nextUsePos");
JitSpew(JitSpew_RegAlloc, " Computing nextUsePos");
// Compute next-used positions for all registers
CodePosition nextUsePos[AnyRegister::Total];
@ -1125,10 +1125,10 @@ LinearScanAllocator::findBestBlockedRegister(CodePosition *nextUsed)
AnyRegister reg = fullreg.aliased(a);
if (i->start() == current->start()) {
nextUsePos[reg.code()] = CodePosition::MIN;
IonSpew(IonSpew_RegAlloc, " Disqualifying %s due to recency", reg.name());
JitSpew(JitSpew_RegAlloc, " Disqualifying %s due to recency", reg.name());
} else if (nextUsePos[reg.code()] != CodePosition::MIN) {
nextUsePos[reg.code()] = i->nextUsePosAfter(current->start());
IonSpew(IonSpew_RegAlloc, " Register %s next used %u", reg.name(),
JitSpew(JitSpew_RegAlloc, " Register %s next used %u", reg.name(),
nextUsePos[reg.code()].bits());
}
}
@ -1142,7 +1142,7 @@ LinearScanAllocator::findBestBlockedRegister(CodePosition *nextUsed)
for (size_t a = 0; a < reg.numAliased(); a++) {
if (pos < nextUsePos[reg.aliased(a).code()]) {
nextUsePos[reg.aliased(a).code()] = pos;
IonSpew(IonSpew_RegAlloc, " Register %s next used %u", reg.aliased(a).name(), pos.bits());
JitSpew(JitSpew_RegAlloc, " Register %s next used %u", reg.aliased(a).name(), pos.bits());
}
}
}
@ -1158,7 +1158,7 @@ LinearScanAllocator::findBestBlockedRegister(CodePosition *nextUsed)
CodePosition pos = i->intersect(current);
if (pos != CodePosition::MIN && pos < nextUsePos[reg.code()]) {
nextUsePos[reg.code()] = (pos == current->start()) ? CodePosition::MIN : pos;
IonSpew(IonSpew_RegAlloc, " Register %s next used %u (fixed)", reg.name(), pos.bits());
JitSpew(JitSpew_RegAlloc, " Register %s next used %u (fixed)", reg.name(), pos.bits());
}
}
}
@ -1286,7 +1286,7 @@ LinearScanAllocator::validateAllocations()
bool
LinearScanAllocator::go()
{
IonSpew(IonSpew_RegAlloc, "Beginning register allocation");
JitSpew(JitSpew_RegAlloc, "Beginning register allocation");
if (!buildLivenessInfo())
return false;
@ -1294,44 +1294,44 @@ LinearScanAllocator::go()
if (mir->shouldCancel("LSRA Liveness"))
return false;
IonSpew(IonSpew_RegAlloc, "Beginning preliminary register allocation");
JitSpew(JitSpew_RegAlloc, "Beginning preliminary register allocation");
if (!allocateRegisters())
return false;
IonSpew(IonSpew_RegAlloc, "Preliminary register allocation complete");
JitSpew(JitSpew_RegAlloc, "Preliminary register allocation complete");
if (mir->shouldCancel("LSRA Preliminary Regalloc"))
return false;
if (IonSpewEnabled(IonSpew_RegAlloc)) {
if (JitSpewEnabled(JitSpew_RegAlloc)) {
fprintf(stderr, "Allocations by virtual register:\n");
dumpVregs();
}
IonSpew(IonSpew_RegAlloc, "Beginning control flow resolution");
JitSpew(JitSpew_RegAlloc, "Beginning control flow resolution");
if (!resolveControlFlow())
return false;
IonSpew(IonSpew_RegAlloc, "Control flow resolution complete");
JitSpew(JitSpew_RegAlloc, "Control flow resolution complete");
if (mir->shouldCancel("LSRA Control Flow"))
return false;
IonSpew(IonSpew_RegAlloc, "Beginning register allocation reification");
JitSpew(JitSpew_RegAlloc, "Beginning register allocation reification");
if (!reifyAllocations())
return false;
IonSpew(IonSpew_RegAlloc, "Register allocation reification complete");
JitSpew(JitSpew_RegAlloc, "Register allocation reification complete");
if (mir->shouldCancel("LSRA Reification"))
return false;
IonSpew(IonSpew_RegAlloc, "Beginning safepoint population.");
JitSpew(JitSpew_RegAlloc, "Beginning safepoint population.");
if (!populateSafepoints())
return false;
IonSpew(IonSpew_RegAlloc, "Safepoint population complete.");
JitSpew(JitSpew_RegAlloc, "Safepoint population complete.");
if (mir->shouldCancel("LSRA Safepoints"))
return false;
IonSpew(IonSpew_RegAlloc, "Register allocation complete");
JitSpew(JitSpew_RegAlloc, "Register allocation complete");
return true;
}

View File

@ -589,7 +589,7 @@ template <typename VREG, bool forLSRA>
bool
LiveRangeAllocator<VREG, forLSRA>::buildLivenessInfo()
{
IonSpew(IonSpew_RegAlloc, "Beginning liveness analysis");
JitSpew(JitSpew_RegAlloc, "Beginning liveness analysis");
if (!init())
return false;
@ -939,9 +939,9 @@ LiveRangeAllocator<VREG, forLSRA>::buildLivenessInfo()
}
}
IonSpew(IonSpew_RegAlloc, "Liveness analysis complete");
JitSpew(JitSpew_RegAlloc, "Liveness analysis complete");
if (IonSpewEnabled(IonSpew_RegAlloc)) {
if (JitSpewEnabled(JitSpew_RegAlloc)) {
dumpInstructions();
fprintf(stderr, "Live ranges by virtual register:\n");

View File

@ -112,7 +112,7 @@ LoopUnroller::go(LoopIterationBound *bound)
// For now we always unroll loops the same number of times.
static const size_t UnrollCount = 10;
IonSpew(IonSpew_Unrolling, "Attempting to unroll loop");
JitSpew(JitSpew_Unrolling, "Attempting to unroll loop");
header = bound->header;
JS_ASSERT(header->isLoopHeader());
@ -151,7 +151,7 @@ LoopUnroller::go(LoopIterationBound *bound)
continue;
if (ins->isTest() || ins->isGoto() || ins->isInterruptCheck())
continue;
IonSpew(IonSpew_Unrolling, "Aborting: can't clone instruction %s", ins->opName());
JitSpew(JitSpew_Unrolling, "Aborting: can't clone instruction %s", ins->opName());
return;
}
}
@ -179,7 +179,7 @@ LoopUnroller::go(LoopIterationBound *bound)
// OK, we've checked everything, now unroll the loop.
IonSpew(IonSpew_Unrolling, "Unrolling loop");
JitSpew(JitSpew_Unrolling, "Unrolling loop");
// The old preheader will go before the unrolled loop, and the old loop
// will need a new empty preheader.

View File

@ -8,7 +8,7 @@
#include "mozilla/DebugOnly.h"
#include "jit/IonSpewer.h"
#include "jit/JitSpewer.h"
#include "jit/LIR.h"
#include "jit/MIR.h"
#include "jit/MIRGraph.h"
@ -3801,27 +3801,27 @@ LIRGenerator::visitSimdBinaryBitwise(MSimdBinaryBitwise *ins)
static void
SpewResumePoint(MBasicBlock *block, MInstruction *ins, MResumePoint *resumePoint)
{
fprintf(IonSpewFile, "Current resume point %p details:\n", (void *)resumePoint);
fprintf(IonSpewFile, " frame count: %u\n", resumePoint->frameCount());
fprintf(JitSpewFile, "Current resume point %p details:\n", (void *)resumePoint);
fprintf(JitSpewFile, " frame count: %u\n", resumePoint->frameCount());
if (ins) {
fprintf(IonSpewFile, " taken after: ");
ins->printName(IonSpewFile);
fprintf(JitSpewFile, " taken after: ");
ins->printName(JitSpewFile);
} else {
fprintf(IonSpewFile, " taken at block %d entry", block->id());
fprintf(JitSpewFile, " taken at block %d entry", block->id());
}
fprintf(IonSpewFile, "\n");
fprintf(JitSpewFile, "\n");
fprintf(IonSpewFile, " pc: %p (script: %p, offset: %d)\n",
fprintf(JitSpewFile, " pc: %p (script: %p, offset: %d)\n",
(void *)resumePoint->pc(),
(void *)resumePoint->block()->info().script(),
int(resumePoint->block()->info().script()->pcToOffset(resumePoint->pc())));
for (size_t i = 0, e = resumePoint->numOperands(); i < e; i++) {
MDefinition *in = resumePoint->getOperand(i);
fprintf(IonSpewFile, " slot%u: ", (unsigned)i);
in->printName(IonSpewFile);
fprintf(IonSpewFile, "\n");
fprintf(JitSpewFile, " slot%u: ", (unsigned)i);
in->printName(JitSpewFile);
fprintf(JitSpewFile, "\n");
}
}
@ -3880,7 +3880,7 @@ void
LIRGenerator::updateResumeState(MInstruction *ins)
{
lastResumePoint_ = ins->resumePoint();
if (IonSpewEnabled(IonSpew_Snapshots) && lastResumePoint_)
if (JitSpewEnabled(JitSpew_Snapshots) && lastResumePoint_)
SpewResumePoint(nullptr, ins, lastResumePoint_);
}
@ -3888,7 +3888,7 @@ void
LIRGenerator::updateResumeState(MBasicBlock *block)
{
lastResumePoint_ = block->entryResumePoint();
if (IonSpewEnabled(IonSpew_Snapshots) && lastResumePoint_)
if (JitSpewEnabled(JitSpew_Snapshots) && lastResumePoint_)
SpewResumePoint(block, nullptr, lastResumePoint_);
}

View File

@ -16,7 +16,7 @@
#include "jit/BaselineInspector.h"
#include "jit/IonBuilder.h"
#include "jit/IonSpewer.h"
#include "jit/JitSpewer.h"
#include "jit/MIRGraph.h"
#include "jit/RangeAnalysis.h"
@ -3270,7 +3270,7 @@ InlinePropertyTable::trimTo(ObjectVector &targets, BoolVector &choiceSet)
void
InlinePropertyTable::trimToTargets(ObjectVector &targets)
{
IonSpew(IonSpew_Inlining, "Got inlineable property cache with %d cases",
JitSpew(JitSpew_Inlining, "Got inlineable property cache with %d cases",
(int)numEntries());
size_t i = 0;
@ -3288,7 +3288,7 @@ InlinePropertyTable::trimToTargets(ObjectVector &targets)
i++;
}
IonSpew(IonSpew_Inlining, "%d inlineable cases left after trimming to %d targets",
JitSpew(JitSpew_Inlining, "%d inlineable cases left after trimming to %d targets",
(int)numEntries(), (int)targets.length());
}

View File

@ -9,7 +9,7 @@
#include "asmjs/AsmJSValidate.h"
#include "jit/BytecodeAnalysis.h"
#include "jit/Ion.h"
#include "jit/IonSpewer.h"
#include "jit/JitSpewer.h"
#include "jit/MIR.h"
#include "jit/MIRGenerator.h"
@ -73,7 +73,7 @@ MIRGenerator::usesSimd()
bool
MIRGenerator::abortFmt(const char *message, va_list ap)
{
IonSpewVA(IonSpew_Abort, message, ap);
JitSpewVA(JitSpew_Abort, message, ap);
error_ = true;
return false;
}

View File

@ -8,7 +8,7 @@
#include "jit/Ion.h"
#include "jit/IonAnalysis.h"
#include "jit/IonSpewer.h"
#include "jit/JitSpewer.h"
#include "jit/MIR.h"
#include "jit/MIRGenerator.h"
#include "jit/MIRGraph.h"

View File

@ -11,7 +11,7 @@
#endif
#ifdef JS_ION_PERF
# include "jit/IonSpewer.h"
# include "jit/JitSpewer.h"
# include "jit/LinearScan.h"
# include "jit/LIR.h"
# include "jit/MIR.h"

View File

@ -10,7 +10,7 @@
#include "jit/Ion.h"
#include "jit/IonAnalysis.h"
#include "jit/IonSpewer.h"
#include "jit/JitSpewer.h"
#include "jit/MIR.h"
#include "jit/MIRGenerator.h"
#include "jit/MIRGraph.h"
@ -110,11 +110,11 @@ static inline void
SpewRange(MDefinition *def)
{
#ifdef DEBUG
if (IonSpewEnabled(IonSpew_Range) && def->type() != MIRType_None && def->range()) {
IonSpewHeader(IonSpew_Range);
def->printName(IonSpewFile);
fprintf(IonSpewFile, " has range ");
def->range()->dump(IonSpewFile);
if (JitSpewEnabled(JitSpew_Range) && def->type() != MIRType_None && def->range()) {
JitSpewHeader(JitSpew_Range);
def->printName(JitSpewFile);
fprintf(JitSpewFile, " has range ");
def->range()->dump(JitSpewFile);
}
#endif
}
@ -139,11 +139,11 @@ RangeAnalysis::replaceDominatedUsesWith(MDefinition *orig, MDefinition *dom,
bool
RangeAnalysis::addBetaNodes()
{
IonSpew(IonSpew_Range, "Adding beta nodes");
JitSpew(JitSpew_Range, "Adding beta nodes");
for (PostorderIterator i(graph_.poBegin()); i != graph_.poEnd(); i++) {
MBasicBlock *block = *i;
IonSpew(IonSpew_Range, "Looking at block %d", block->id());
JitSpew(JitSpew_Range, "Looking at block %d", block->id());
BranchDirection branch_dir;
MTest *test = block->immediateDominatorBranch(&branch_dir);
@ -195,12 +195,12 @@ RangeAnalysis::addBetaNodes()
Range::NewInt32Range(alloc(), JSVAL_INT_MIN, JSVAL_INT_MAX-1));
block->insertBefore(*block->begin(), beta);
replaceDominatedUsesWith(smaller, beta, block);
IonSpew(IonSpew_Range, "Adding beta node for smaller %d", smaller->id());
JitSpew(JitSpew_Range, "Adding beta node for smaller %d", smaller->id());
beta = MBeta::New(alloc(), greater,
Range::NewInt32Range(alloc(), JSVAL_INT_MIN+1, JSVAL_INT_MAX));
block->insertBefore(*block->begin(), beta);
replaceDominatedUsesWith(greater, beta, block);
IonSpew(IonSpew_Range, "Adding beta node for greater %d", greater->id());
JitSpew(JitSpew_Range, "Adding beta node for greater %d", greater->id());
}
continue;
} else {
@ -245,10 +245,10 @@ RangeAnalysis::addBetaNodes()
// [-\inf, bound-1] U [bound+1, \inf] but we only use contiguous ranges.
}
if (IonSpewEnabled(IonSpew_Range)) {
IonSpewHeader(IonSpew_Range);
fprintf(IonSpewFile, "Adding beta node for %d with range ", val->id());
comp.dump(IonSpewFile);
if (JitSpewEnabled(JitSpew_Range)) {
JitSpewHeader(JitSpew_Range);
fprintf(JitSpewFile, "Adding beta node for %d with range ", val->id());
comp.dump(JitSpewFile);
}
MBeta *beta = MBeta::New(alloc(), val, new(alloc()) Range(comp));
@ -262,7 +262,7 @@ RangeAnalysis::addBetaNodes()
bool
RangeAnalysis::removeBetaNodes()
{
IonSpew(IonSpew_Range, "Removing beta nodes");
JitSpew(JitSpew_Range, "Removing beta nodes");
for (PostorderIterator i(graph_.poBegin()); i != graph_.poEnd(); i++) {
MBasicBlock *block = *i;
@ -270,7 +270,7 @@ RangeAnalysis::removeBetaNodes()
MDefinition *def = *iter;
if (def->isBeta()) {
MDefinition *op = def->getOperand(0);
IonSpew(IonSpew_Range, "Removing beta node %d for %d",
JitSpew(JitSpew_Range, "Removing beta node %d for %d",
def->id(), op->id());
def->replaceAllUsesWith(op);
iter = block->discardDefAt(iter);
@ -1038,7 +1038,7 @@ MPhi::computeRange(TempAllocator &alloc)
Range *range = nullptr;
for (size_t i = 0, e = numOperands(); i < e; i++) {
if (getOperand(i)->block()->unreachable()) {
IonSpew(IonSpew_Range, "Ignoring unreachable input %d", getOperand(i)->id());
JitSpew(JitSpew_Range, "Ignoring unreachable input %d", getOperand(i)->id());
continue;
}
@ -1066,7 +1066,7 @@ MBeta::computeRange(TempAllocator &alloc)
Range opRange(getOperand(0));
Range *range = Range::intersect(alloc, &opRange, comparison_, &emptyRange);
if (emptyRange) {
IonSpew(IonSpew_Range, "Marking block for inst %d unreachable", id());
JitSpew(JitSpew_Range, "Marking block for inst %d unreachable", id());
block()->setUnreachableUnchecked();
} else {
setRange(range);
@ -1636,11 +1636,11 @@ RangeAnalysis::analyzeLoop(MBasicBlock *header)
return false;
#ifdef DEBUG
if (IonSpewEnabled(IonSpew_Range)) {
if (JitSpewEnabled(JitSpew_Range)) {
Sprinter sp(GetIonContext()->cx);
sp.init();
iterationBound->boundSum.print(sp);
IonSpew(IonSpew_Range, "computed symbolic bound on backedges: %s",
JitSpew(JitSpew_Range, "computed symbolic bound on backedges: %s",
sp.string());
}
#endif
@ -1877,7 +1877,7 @@ RangeAnalysis::analyzeLoopPhi(MBasicBlock *header, LoopIterationBound *loopBound
phi->range()->setSymbolicLower(SymbolicBound::New(alloc(), loopBound, limitSum));
}
IonSpew(IonSpew_Range, "added symbolic range on %d", phi->id());
JitSpew(JitSpew_Range, "added symbolic range on %d", phi->id());
SpewRange(phi);
}
@ -1974,7 +1974,7 @@ RangeAnalysis::tryHoistBoundsCheck(MBasicBlock *header, MBoundsCheck *ins)
bool
RangeAnalysis::analyze()
{
IonSpew(IonSpew_Range, "Doing range propagation");
JitSpew(JitSpew_Range, "Doing range propagation");
for (ReversePostorderIterator iter(graph_.rpoBegin()); iter != graph_.rpoEnd(); iter++) {
MBasicBlock *block = *iter;
@ -1992,7 +1992,7 @@ RangeAnalysis::analyze()
MDefinition *def = *iter;
def->computeRange(alloc());
IonSpew(IonSpew_Range, "computing range on %d", def->id());
JitSpew(JitSpew_Range, "computing range on %d", def->id());
SpewRange(def);
}
@ -2583,7 +2583,7 @@ AdjustTruncatedInputs(TempAllocator &alloc, MInstruction *truncated)
bool
RangeAnalysis::truncate()
{
IonSpew(IonSpew_Range, "Do range-base truncation (backward loop)");
JitSpew(JitSpew_Range, "Do range-base truncation (backward loop)");
// Automatic truncation is disabled for AsmJS because the truncation logic
// is based on IonMonkey which assumes that we can bailout if the truncation
@ -2632,7 +2632,7 @@ RangeAnalysis::truncate()
}
// Update inputs/outputs of truncated instructions.
IonSpew(IonSpew_Range, "Do graph type fixup (dequeue)");
JitSpew(JitSpew_Range, "Do graph type fixup (dequeue)");
while (!worklist.empty()) {
MInstruction *ins = worklist.popCopy();
ins->setNotInWorklist();
@ -2835,7 +2835,7 @@ RangeAnalysis::prepareForUCE(bool *shouldRemoveDeadCode)
}
test->block()->insertBefore(test, constant);
test->replaceOperand(0, constant);
IonSpew(IonSpew_Range, "Update condition of %d to reflect unreachable branches.",
JitSpew(JitSpew_Range, "Update condition of %d to reflect unreachable branches.",
test->id());
*shouldRemoveDeadCode = true;

View File

@ -14,8 +14,8 @@
#include "builtin/RegExp.h"
#include "builtin/TypedObject.h"
#include "jit/IonSpewer.h"
#include "jit/JitFrameIterator.h"
#include "jit/JitSpewer.h"
#include "jit/MIR.h"
#include "jit/MIRGraph.h"
#include "jit/VMFunctions.h"
@ -117,11 +117,11 @@ MResumePoint::writeRecoverData(CompactBufferWriter &writer) const
uint32_t formalArgs = CountArgSlots(script, fun);
uint32_t nallocs = formalArgs + script->nfixed() + exprStack;
IonSpew(IonSpew_Snapshots, "Starting frame; implicit %u, formals %u, fixed %u, exprs %u",
JitSpew(JitSpew_Snapshots, "Starting frame; implicit %u, formals %u, fixed %u, exprs %u",
implicit, formalArgs - implicit, script->nfixed(), exprStack);
uint32_t pcoff = script->pcToOffset(pc());
IonSpew(IonSpew_Snapshots, "Writing pc offset %u, nslots %u", pcoff, nallocs);
JitSpew(JitSpew_Snapshots, "Writing pc offset %u, nslots %u", pcoff, nallocs);
writer.writeUnsigned(pcoff);
writer.writeUnsigned(nallocs);
return true;
@ -131,7 +131,7 @@ RResumePoint::RResumePoint(CompactBufferReader &reader)
{
pcOffset_ = reader.readUnsigned();
numOperands_ = reader.readUnsigned();
IonSpew(IonSpew_Snapshots, "Read RResumePoint (pc offset %u, nslots %u)",
JitSpew(JitSpew_Snapshots, "Read RResumePoint (pc offset %u, nslots %u)",
pcOffset_, numOperands_);
}

View File

@ -84,7 +84,7 @@ AllocationIntegrityState::check(bool populateSafepoints)
JS_ASSERT(!instructions.empty());
#ifdef DEBUG
if (IonSpewEnabled(IonSpew_RegAlloc))
if (JitSpewEnabled(JitSpew_RegAlloc))
dump();
for (size_t blockIndex = 0; blockIndex < graph.numBlocks(); blockIndex++) {
@ -285,7 +285,7 @@ AllocationIntegrityState::checkSafepointAllocation(LInstruction *ins,
switch (type) {
case LDefinition::OBJECT:
if (populateSafepoints) {
IonSpew(IonSpew_RegAlloc, "Safepoint object v%u i%u %s",
JitSpew(JitSpew_RegAlloc, "Safepoint object v%u i%u %s",
vreg, ins->id(), alloc.toString());
if (!safepoint->addGcPointer(alloc))
return false;
@ -294,7 +294,7 @@ AllocationIntegrityState::checkSafepointAllocation(LInstruction *ins,
break;
case LDefinition::SLOTS:
if (populateSafepoints) {
IonSpew(IonSpew_RegAlloc, "Safepoint slots v%u i%u %s",
JitSpew(JitSpew_RegAlloc, "Safepoint slots v%u i%u %s",
vreg, ins->id(), alloc.toString());
if (!safepoint->addSlotsOrElementsPointer(alloc))
return false;
@ -308,7 +308,7 @@ AllocationIntegrityState::checkSafepointAllocation(LInstruction *ins,
// of payloads must be reflected, however, for generational GC.
case LDefinition::TYPE:
if (populateSafepoints) {
IonSpew(IonSpew_RegAlloc, "Safepoint type v%u i%u %s",
JitSpew(JitSpew_RegAlloc, "Safepoint type v%u i%u %s",
vreg, ins->id(), alloc.toString());
if (!safepoint->addNunboxType(vreg, alloc))
return false;
@ -316,7 +316,7 @@ AllocationIntegrityState::checkSafepointAllocation(LInstruction *ins,
break;
case LDefinition::PAYLOAD:
if (populateSafepoints) {
IonSpew(IonSpew_RegAlloc, "Safepoint payload v%u i%u %s",
JitSpew(JitSpew_RegAlloc, "Safepoint payload v%u i%u %s",
vreg, ins->id(), alloc.toString());
if (!safepoint->addNunboxPayload(vreg, alloc))
return false;
@ -326,7 +326,7 @@ AllocationIntegrityState::checkSafepointAllocation(LInstruction *ins,
#else
case LDefinition::BOX:
if (populateSafepoints) {
IonSpew(IonSpew_RegAlloc, "Safepoint boxed value v%u i%u %s",
JitSpew(JitSpew_RegAlloc, "Safepoint boxed value v%u i%u %s",
vreg, ins->id(), alloc.toString());
if (!safepoint->addBoxedValue(alloc))
return false;

View File

@ -9,7 +9,7 @@
#include "mozilla/MathAlgorithms.h"
#include "jit/BitSet.h"
#include "jit/IonSpewer.h"
#include "jit/JitSpewer.h"
#include "jit/LIR.h"
using namespace js;
@ -30,7 +30,7 @@ SafepointWriter::init(TempAllocator &alloc, uint32_t slotCount)
uint32_t
SafepointWriter::startEntry()
{
IonSpew(IonSpew_Safepoints, "Encoding safepoint (position %d):", stream_.length());
JitSpew(JitSpew_Safepoints, "Encoding safepoint (position %d):", stream_.length());
return uint32_t(stream_.length());
}
@ -111,7 +111,7 @@ SafepointWriter::writeGcRegs(LSafepoint *safepoint)
WriteFloatRegisterMask(stream_, spilledFloat.bits());
#ifdef DEBUG
if (IonSpewEnabled(IonSpew_Safepoints)) {
if (JitSpewEnabled(JitSpew_Safepoints)) {
for (GeneralRegisterForwardIterator iter(spilledGpr); iter.more(); iter++) {
const char *type = gc.has(*iter)
? "gc"
@ -120,10 +120,10 @@ SafepointWriter::writeGcRegs(LSafepoint *safepoint)
: valueRegs.has(*iter)
? "value"
: "any";
IonSpew(IonSpew_Safepoints, " %s reg: %s", type, (*iter).name());
JitSpew(JitSpew_Safepoints, " %s reg: %s", type, (*iter).name());
}
for (FloatRegisterForwardIterator iter(spilledFloat); iter.more(); iter++)
IonSpew(IonSpew_Safepoints, " float reg: %s", (*iter).name());
JitSpew(JitSpew_Safepoints, " float reg: %s", (*iter).name());
}
#endif
}
@ -156,7 +156,7 @@ SafepointWriter::writeGcSlots(LSafepoint *safepoint)
#ifdef DEBUG
for (uint32_t i = 0; i < slots.length(); i++)
IonSpew(IonSpew_Safepoints, " gc slot: %d", slots[i]);
JitSpew(JitSpew_Safepoints, " gc slot: %d", slots[i]);
#endif
MapSlotsToBitset(frameSlots_,
@ -174,7 +174,7 @@ SafepointWriter::writeSlotsOrElementsSlots(LSafepoint *safepoint)
for (uint32_t i = 0; i < slots.length(); i++) {
#ifdef DEBUG
IonSpew(IonSpew_Safepoints, " slots/elements slot: %d", slots[i]);
JitSpew(JitSpew_Safepoints, " slots/elements slot: %d", slots[i]);
#endif
stream_.writeUnsigned(slots[i]);
}
@ -187,7 +187,7 @@ SafepointWriter::writeValueSlots(LSafepoint *safepoint)
#ifdef DEBUG
for (uint32_t i = 0; i < slots.length(); i++)
IonSpew(IonSpew_Safepoints, " gc value: %d", slots[i]);
JitSpew(JitSpew_Safepoints, " gc value: %d", slots[i]);
#endif
MapSlotsToBitset(frameSlots_, stream_, slots.length(), slots.begin());
@ -198,11 +198,11 @@ static void
DumpNunboxPart(const LAllocation &a)
{
if (a.isStackSlot()) {
fprintf(IonSpewFile, "stack %d", a.toStackSlot()->slot());
fprintf(JitSpewFile, "stack %d", a.toStackSlot()->slot());
} else if (a.isArgument()) {
fprintf(IonSpewFile, "arg %d", a.toArgument()->index());
fprintf(JitSpewFile, "arg %d", a.toArgument()->index());
} else {
fprintf(IonSpewFile, "reg %s", a.toGeneralReg()->reg().name());
fprintf(JitSpewFile, "reg %s", a.toGeneralReg()->reg().name());
}
}
#endif // DEBUG
@ -281,17 +281,17 @@ SafepointWriter::writeNunboxParts(LSafepoint *safepoint)
LSafepoint::NunboxList &entries = safepoint->nunboxParts();
# ifdef DEBUG
if (IonSpewEnabled(IonSpew_Safepoints)) {
if (JitSpewEnabled(JitSpew_Safepoints)) {
for (uint32_t i = 0; i < entries.length(); i++) {
SafepointNunboxEntry &entry = entries[i];
if (entry.type.isUse() || entry.payload.isUse())
continue;
IonSpewHeader(IonSpew_Safepoints);
fprintf(IonSpewFile, " nunbox (type in ");
JitSpewHeader(JitSpew_Safepoints);
fprintf(JitSpewFile, " nunbox (type in ");
DumpNunboxPart(entry.type);
fprintf(IonSpewFile, ", payload in ");
fprintf(JitSpewFile, ", payload in ");
DumpNunboxPart(entry.payload);
fprintf(IonSpewFile, ")\n");
fprintf(JitSpewFile, ")\n");
}
}
# endif
@ -366,7 +366,7 @@ SafepointWriter::encode(LSafepoint *safepoint)
void
SafepointWriter::endEntry()
{
IonSpew(IonSpew_Safepoints, " -- entry ended at %d", uint32_t(stream_.length()));
JitSpew(JitSpew_Safepoints, " -- entry ended at %d", uint32_t(stream_.length()));
}
SafepointReader::SafepointReader(IonScript *script, const SafepointIndex *si)

View File

@ -9,7 +9,7 @@
#include "mozilla/Vector.h"
#include "jit/IonAnalysis.h"
#include "jit/IonSpewer.h"
#include "jit/JitSpewer.h"
#include "jit/MIR.h"
#include "jit/MIRGenerator.h"
#include "jit/MIRGraph.h"
@ -147,7 +147,7 @@ IsObjectEscaped(MInstruction *ins)
if (!consumer->isDefinition()) {
// Cannot optimize if it is observable from fun.arguments or others.
if (consumer->toResumePoint()->isObservableOperand(*i)) {
IonSpewDef(IonSpew_Escape, "Object is observable\n", ins);
JitSpewDef(JitSpew_Escape, "Object is observable\n", ins);
return true;
}
continue;
@ -161,8 +161,8 @@ IsObjectEscaped(MInstruction *ins)
if (def->indexOf(*i) == 0)
break;
IonSpewDef(IonSpew_Escape, "Object ", ins);
IonSpewDef(IonSpew_Escape, " is escaped by\n", def);
JitSpewDef(JitSpew_Escape, "Object ", ins);
JitSpewDef(JitSpew_Escape, " is escaped by\n", def);
return true;
case MDefinition::Op_Slots: {
@ -185,8 +185,8 @@ IsObjectEscaped(MInstruction *ins)
MGuardShape *guard = def->toGuardShape();
MOZ_ASSERT(!ins->isGuardShape());
if (ins->toNewObject()->templateObject()->lastProperty() != guard->shape()) {
IonSpewDef(IonSpew_Escape, "Object ", ins);
IonSpewDef(IonSpew_Escape, " has a non-matching guard shape\n", guard);
JitSpewDef(JitSpew_Escape, "Object ", ins);
JitSpewDef(JitSpew_Escape, " has a non-matching guard shape\n", guard);
return true;
}
if (IsObjectEscaped(def->toInstruction()))
@ -194,13 +194,13 @@ IsObjectEscaped(MInstruction *ins)
break;
}
default:
IonSpewDef(IonSpew_Escape, "Object ", ins);
IonSpewDef(IonSpew_Escape, " is escaped by\n", def);
JitSpewDef(JitSpew_Escape, "Object ", ins);
JitSpewDef(JitSpew_Escape, " is escaped by\n", def);
return true;
}
}
IonSpewDef(IonSpew_Escape, "Object is not escaped\n", ins);
JitSpewDef(JitSpew_Escape, "Object is not escaped\n", ins);
return false;
}
@ -509,12 +509,12 @@ IsArrayEscaped(MInstruction *ins)
// The array is probably too large to be represented efficiently with
// MArrayState, and we do not want to make huge allocations during bailouts.
if (!ins->toNewArray()->isAllocating()) {
IonSpewDef(IonSpew_Escape, "Array is not allocated\n", ins);
JitSpewDef(JitSpew_Escape, "Array is not allocated\n", ins);
return true;
}
if (count >= 16) {
IonSpewDef(IonSpew_Escape, "Array has too many elements\n", ins);
JitSpewDef(JitSpew_Escape, "Array has too many elements\n", ins);
return true;
}
@ -526,7 +526,7 @@ IsArrayEscaped(MInstruction *ins)
if (!consumer->isDefinition()) {
// Cannot optimize if it is observable from fun.arguments or others.
if (consumer->toResumePoint()->isObservableOperand(*i)) {
IonSpewDef(IonSpew_Escape, "Array is observable\n", ins);
JitSpewDef(JitSpew_Escape, "Array is observable\n", ins);
return true;
}
continue;
@ -551,8 +551,8 @@ IsArrayEscaped(MInstruction *ins)
// which are not reflected by the alias set, is we are
// bailing on holes.
if (access->toLoadElement()->needsHoleCheck()) {
IonSpewDef(IonSpew_Escape, "Array ", ins);
IonSpewDef(IonSpew_Escape,
JitSpewDef(JitSpew_Escape, "Array ", ins);
JitSpewDef(JitSpew_Escape,
" has a load element which needs hole check\n", access);
return true;
}
@ -561,14 +561,14 @@ IsArrayEscaped(MInstruction *ins)
// all others. We do not handle this case.
int32_t index;
if (!IndexOf(access, &index)) {
IonSpewDef(IonSpew_Escape, "Array ", ins);
IonSpewDef(IonSpew_Escape,
JitSpewDef(JitSpew_Escape, "Array ", ins);
JitSpewDef(JitSpew_Escape,
" has a load element with a non-trivial index\n", access);
return true;
}
if (index < 0 || count <= uint32_t(index)) {
IonSpewDef(IonSpew_Escape, "Array ", ins);
IonSpewDef(IonSpew_Escape,
JitSpewDef(JitSpew_Escape, "Array ", ins);
JitSpewDef(JitSpew_Escape,
" has a load element with an out-of-bound index\n", access);
return true;
}
@ -590,20 +590,20 @@ IsArrayEscaped(MInstruction *ins)
// all others. We do not handle this case.
int32_t index;
if (!IndexOf(access, &index)) {
IonSpewDef(IonSpew_Escape, "Array ", ins);
IonSpewDef(IonSpew_Escape, " has a store element with a non-trivial index\n", access);
JitSpewDef(JitSpew_Escape, "Array ", ins);
JitSpewDef(JitSpew_Escape, " has a store element with a non-trivial index\n", access);
return true;
}
if (index < 0 || count <= uint32_t(index)) {
IonSpewDef(IonSpew_Escape, "Array ", ins);
IonSpewDef(IonSpew_Escape, " has a store element with an out-of-bound index\n", access);
JitSpewDef(JitSpew_Escape, "Array ", ins);
JitSpewDef(JitSpew_Escape, " has a store element with an out-of-bound index\n", access);
return true;
}
// We are not yet encoding magic hole constants in resume points.
if (access->toStoreElement()->value()->type() == MIRType_MagicHole) {
IonSpewDef(IonSpew_Escape, "Array ", ins);
IonSpewDef(IonSpew_Escape, " has a store element with an magic-hole constant\n", access);
JitSpewDef(JitSpew_Escape, "Array ", ins);
JitSpewDef(JitSpew_Escape, " has a store element with an magic-hole constant\n", access);
return true;
}
break;
@ -622,8 +622,8 @@ IsArrayEscaped(MInstruction *ins)
break;
default:
IonSpewDef(IonSpew_Escape, "Array's element ", ins);
IonSpewDef(IonSpew_Escape, " is escaped by\n", def);
JitSpewDef(JitSpew_Escape, "Array's element ", ins);
JitSpewDef(JitSpew_Escape, " is escaped by\n", def);
return true;
}
}
@ -632,13 +632,13 @@ IsArrayEscaped(MInstruction *ins)
}
default:
IonSpewDef(IonSpew_Escape, "Array ", ins);
IonSpewDef(IonSpew_Escape, " is escaped by\n", def);
JitSpewDef(JitSpew_Escape, "Array ", ins);
JitSpewDef(JitSpew_Escape, " is escaped by\n", def);
return true;
}
}
IonSpewDef(IonSpew_Escape, "Array is not escaped\n", ins);
JitSpewDef(JitSpew_Escape, "Array is not escaped\n", ins);
return false;
}

View File

@ -9,7 +9,7 @@
#include "jsscript.h"
#include "jit/CompileInfo.h"
#include "jit/IonSpewer.h"
#include "jit/JitSpewer.h"
#ifdef TRACK_SNAPSHOTS
# include "jit/LIR.h"
#endif
@ -475,7 +475,7 @@ SnapshotReader::SnapshotReader(const uint8_t *snapshots, uint32_t offset,
{
if (!snapshots)
return;
IonSpew(IonSpew_Snapshots, "Creating snapshot reader");
JitSpew(JitSpew_Snapshots, "Creating snapshot reader");
readSnapshotHeader();
}
@ -511,7 +511,7 @@ SnapshotReader::readSnapshotHeader()
bailoutKind_ = BailoutKind((bits & SNAPSHOT_BAILOUTKIND_MASK) >> SNAPSHOT_BAILOUTKIND_SHIFT);
recoverOffset_ = (bits & SNAPSHOT_ROFFSET_MASK) >> SNAPSHOT_ROFFSET_SHIFT;
IonSpew(IonSpew_Snapshots, "Read snapshot header with bailout kind %u",
JitSpew(JitSpew_Snapshots, "Read snapshot header with bailout kind %u",
bailoutKind_);
#ifdef TRACK_SNAPSHOTS
@ -533,14 +533,14 @@ SnapshotReader::readTrackSnapshot()
void
SnapshotReader::spewBailingFrom() const
{
if (IonSpewEnabled(IonSpew_Bailouts)) {
IonSpewHeader(IonSpew_Bailouts);
fprintf(IonSpewFile, " bailing from bytecode: %s, MIR: ", js_CodeName[pcOpcode_]);
MDefinition::PrintOpcodeName(IonSpewFile, MDefinition::Opcode(mirOpcode_));
fprintf(IonSpewFile, " [%u], LIR: ", mirId_);
LInstruction::printName(IonSpewFile, LInstruction::Opcode(lirOpcode_));
fprintf(IonSpewFile, " [%u]", lirId_);
fprintf(IonSpewFile, "\n");
if (JitSpewEnabled(JitSpew_Bailouts)) {
JitSpewHeader(JitSpew_Bailouts);
fprintf(JitSpewFile, " bailing from bytecode: %s, MIR: ", js_CodeName[pcOpcode_]);
MDefinition::PrintOpcodeName(JitSpewFile, MDefinition::Opcode(mirOpcode_));
fprintf(JitSpewFile, " [%u], LIR: ", mirId_);
LInstruction::printName(JitSpewFile, LInstruction::Opcode(lirOpcode_));
fprintf(JitSpewFile, " [%u]", lirId_);
fprintf(JitSpewFile, "\n");
}
}
#endif
@ -555,7 +555,7 @@ SnapshotReader::readAllocationIndex()
RValueAllocation
SnapshotReader::readAllocation()
{
IonSpew(IonSpew_Snapshots, "Reading slot %u", allocRead_);
JitSpew(JitSpew_Snapshots, "Reading slot %u", allocRead_);
uint32_t offset = readAllocationIndex() * ALLOCATION_TABLE_ALIGNMENT;
allocReader_.seek(allocTable_, offset);
return RValueAllocation::read(allocReader_);
@ -591,7 +591,7 @@ RecoverReader::readRecoverHeader()
resumeAfter_ = (bits & RECOVER_RESUMEAFTER_MASK) >> RECOVER_RESUMEAFTER_SHIFT;
MOZ_ASSERT(numInstructions_);
IonSpew(IonSpew_Snapshots, "Read recover header with instructionCount %u (ra: %d)",
JitSpew(JitSpew_Snapshots, "Read recover header with instructionCount %u (ra: %d)",
numInstructions_, resumeAfter_);
}
@ -609,7 +609,7 @@ SnapshotWriter::startSnapshot(RecoverOffset recoverOffset, BailoutKind kind)
lastStart_ = writer_.length();
allocWritten_ = 0;
IonSpew(IonSpew_Snapshots, "starting snapshot with recover offset %u, bailout kind %u",
JitSpew(JitSpew_Snapshots, "starting snapshot with recover offset %u, bailout kind %u",
recoverOffset, kind);
JS_ASSERT(uint32_t(kind) < (1 << SNAPSHOT_BAILOUTKIND_BITS));
@ -651,11 +651,11 @@ SnapshotWriter::add(const RValueAllocation &alloc)
offset = p->value();
}
if (IonSpewEnabled(IonSpew_Snapshots)) {
IonSpewHeader(IonSpew_Snapshots);
fprintf(IonSpewFile, " slot %u (%d): ", allocWritten_, offset);
alloc.dump(IonSpewFile);
fprintf(IonSpewFile, "\n");
if (JitSpewEnabled(JitSpew_Snapshots)) {
JitSpewHeader(JitSpew_Snapshots);
fprintf(JitSpewFile, " slot %u (%d): ", allocWritten_, offset);
alloc.dump(JitSpewFile);
fprintf(JitSpewFile, "\n");
}
allocWritten_++;
@ -671,7 +671,7 @@ SnapshotWriter::endSnapshot()
writer_.writeSigned(-1);
#endif
IonSpew(IonSpew_Snapshots, "ending snapshot total size: %u bytes (start %u)",
JitSpew(JitSpew_Snapshots, "ending snapshot total size: %u bytes (start %u)",
uint32_t(writer_.length() - lastStart_), lastStart_);
}
@ -682,7 +682,7 @@ RecoverWriter::startRecover(uint32_t instructionCount, bool resumeAfter)
instructionCount_ = instructionCount;
instructionsWritten_ = 0;
IonSpew(IonSpew_Snapshots, "starting recover with %u instruction(s)",
JitSpew(JitSpew_Snapshots, "starting recover with %u instruction(s)",
instructionCount);
MOZ_ASSERT(!(uint32_t(resumeAfter) &~ RECOVER_RESUMEAFTER_MASK));

View File

@ -8,7 +8,7 @@
#include "jit/AliasAnalysis.h"
#include "jit/IonAnalysis.h"
#include "jit/IonSpewer.h"
#include "jit/JitSpewer.h"
#include "jit/MIRGenerator.h"
using namespace js;
@ -259,7 +259,7 @@ ValueNumberer::discardInsOperands(MInstruction *ins)
bool
ValueNumberer::deleteDef(MDefinition *def)
{
IonSpew(IonSpew_GVN, " Deleting %s%u", def->opName(), def->id());
JitSpew(JitSpew_GVN, " Deleting %s%u", def->opName(), def->id());
MOZ_ASSERT(IsDead(def), "Deleting non-dead definition");
MOZ_ASSERT(!values_.has(def), "Deleting an instruction still in the set");
@ -302,10 +302,10 @@ ValueNumberer::removePredecessor(MBasicBlock *block, MBasicBlock *pred)
if (block->loopPredecessor() == pred) {
// Deleting the entry into the loop makes the loop unreachable.
isUnreachableLoop = true;
IonSpew(IonSpew_GVN, " Loop with header block%u is no longer reachable", block->id());
JitSpew(JitSpew_GVN, " Loop with header block%u is no longer reachable", block->id());
#ifdef DEBUG
} else if (block->hasUniqueBackedge() && block->backedge() == pred) {
IonSpew(IonSpew_GVN, " Loop with header block%u is no longer a loop", block->id());
JitSpew(JitSpew_GVN, " Loop with header block%u is no longer a loop", block->id());
#endif
}
}
@ -354,16 +354,16 @@ ValueNumberer::removeBlocksRecursively(MBasicBlock *start, const MBasicBlock *do
}
#ifdef DEBUG
IonSpew(IonSpew_GVN, " Deleting block%u%s%s%s", block->id(),
JitSpew(JitSpew_GVN, " Deleting block%u%s%s%s", block->id(),
block->isLoopHeader() ? " (loop header)" : "",
block->isSplitEdge() ? " (split edge)" : "",
block->immediateDominator() == block ? " (dominator root)" : "");
for (MDefinitionIterator iter(block); iter; iter++) {
MDefinition *def = *iter;
IonSpew(IonSpew_GVN, " Deleting %s%u", def->opName(), def->id());
JitSpew(JitSpew_GVN, " Deleting %s%u", def->opName(), def->id());
}
MControlInstruction *control = block->lastIns();
IonSpew(IonSpew_GVN, " Deleting %s%u", control->opName(), control->id());
JitSpew(JitSpew_GVN, " Deleting %s%u", control->opName(), control->id());
#endif
// Keep track of how many blocks within dominatorRoot's tree have been deleted.
@ -465,7 +465,7 @@ ValueNumberer::visitDefinition(MDefinition *def)
if (sim->block() == nullptr)
def->block()->insertAfter(def->toInstruction(), sim->toInstruction());
IonSpew(IonSpew_GVN, " Folded %s%u to %s%u",
JitSpew(JitSpew_GVN, " Folded %s%u to %s%u",
def->opName(), def->id(), sim->opName(), sim->id());
ReplaceAllUsesWith(def, sim);
@ -485,7 +485,7 @@ ValueNumberer::visitDefinition(MDefinition *def)
if (rep == nullptr)
return false;
if (rep->updateForReplacement(def)) {
IonSpew(IonSpew_GVN,
JitSpew(JitSpew_GVN,
" Replacing %s%u with %s%u",
def->opName(), def->id(), rep->opName(), rep->id());
ReplaceAllUsesWith(def, rep);
@ -506,7 +506,7 @@ ValueNumberer::visitDefinition(MDefinition *def)
if (updateAliasAnalysis_ && !dependenciesBroken_) {
const MDefinition *dep = def->dependency();
if (dep != nullptr && dep->block()->isDead()) {
IonSpew(IonSpew_GVN, " AliasAnalysis invalidated; will recompute!");
JitSpew(JitSpew_GVN, " AliasAnalysis invalidated; will recompute!");
dependenciesBroken_ = true;
}
}
@ -530,7 +530,7 @@ ValueNumberer::visitControlInstruction(MBasicBlock *block, const MBasicBlock *do
MControlInstruction *newControl = rep->toControlInstruction();
MOZ_ASSERT(!newControl->block(),
"Control instruction replacement shouldn't already be in a block");
IonSpew(IonSpew_GVN, " Folded control instruction %s%u to %s%u",
JitSpew(JitSpew_GVN, " Folded control instruction %s%u to %s%u",
control->opName(), control->id(), newControl->opName(), graph_.getNumInstructionIds());
// If the simplification removes any CFG edges, update the CFG and remove
@ -589,7 +589,7 @@ ValueNumberer::visitBlock(MBasicBlock *block, const MBasicBlock *dominatorRoot)
bool
ValueNumberer::visitDominatorTree(MBasicBlock *dominatorRoot, size_t *totalNumVisited)
{
IonSpew(IonSpew_GVN, " Visiting dominator tree (with %llu blocks) rooted at block%u%s",
JitSpew(JitSpew_GVN, " Visiting dominator tree (with %llu blocks) rooted at block%u%s",
uint64_t(dominatorRoot->numDominated()), dominatorRoot->id(),
dominatorRoot == graph_.entryBlock() ? " (normal entry block)" :
dominatorRoot == graph_.osrBlock() ? " (OSR entry block)" :
@ -613,7 +613,7 @@ ValueNumberer::visitDominatorTree(MBasicBlock *dominatorRoot, size_t *totalNumVi
return false;
// If this was the end of a loop, check for optimization in the header.
if (!rerun_ && block->isLoopBackedge() && loopHasOptimizablePhi(block)) {
IonSpew(IonSpew_GVN, " Loop phi in block%u can now be optimized; will re-run GVN!",
JitSpew(JitSpew_GVN, " Loop phi in block%u can now be optimized; will re-run GVN!",
block->id());
rerun_ = true;
remainingBlocks_.clear();
@ -682,7 +682,7 @@ ValueNumberer::run(UpdateAliasAnalysisFlag updateAliasAnalysis)
if (!values_.init())
return false;
IonSpew(IonSpew_GVN, "Running GVN on graph (with %llu blocks)",
JitSpew(JitSpew_GVN, "Running GVN on graph (with %llu blocks)",
uint64_t(graph_.numBlocks()));
// Top level non-sparse iteration loop. If an iteration performs a
@ -698,7 +698,7 @@ ValueNumberer::run(UpdateAliasAnalysisFlag updateAliasAnalysis)
while (!remainingBlocks_.empty()) {
MBasicBlock *block = remainingBlocks_.popCopy();
if (!block->isDead() && IsDominatorRefined(block)) {
IonSpew(IonSpew_GVN, " Dominator for block%u can now be refined; will re-run GVN!",
JitSpew(JitSpew_GVN, " Dominator for block%u can now be refined; will re-run GVN!",
block->id());
rerun_ = true;
remainingBlocks_.clear();
@ -721,7 +721,7 @@ ValueNumberer::run(UpdateAliasAnalysisFlag updateAliasAnalysis)
if (!rerun_)
break;
IonSpew(IonSpew_GVN, "Re-running GVN on graph (run %d, now with %llu blocks)",
JitSpew(JitSpew_GVN, "Re-running GVN on graph (run %d, now with %llu blocks)",
runs, uint64_t(graph_.numBlocks()));
rerun_ = false;
@ -732,7 +732,7 @@ ValueNumberer::run(UpdateAliasAnalysisFlag updateAliasAnalysis)
// does help avoid slow compile times on pathlogical code.
++runs;
if (runs == 6) {
IonSpew(IonSpew_GVN, "Re-run cutoff reached. Terminating GVN!");
JitSpew(JitSpew_GVN, "Re-run cutoff reached. Terminating GVN!");
break;
}
}

View File

@ -184,7 +184,7 @@ ParseARMHwCapFlags(const char *armHwCap)
#endif
armHwCapFlags = CanonicalizeARMHwCapFlags(flags);
IonSpew(IonSpew_Codegen, "ARM HWCAP: 0x%x\n", armHwCapFlags);
JitSpew(JitSpew_Codegen, "ARM HWCAP: 0x%x\n", armHwCapFlags);
return true;
}
@ -263,7 +263,7 @@ InitARMFlags()
armHwCapFlags = CanonicalizeARMHwCapFlags(flags);
IonSpew(IonSpew_Codegen, "ARM HWCAP: 0x%x\n", armHwCapFlags);
JitSpew(JitSpew_Codegen, "ARM HWCAP: 0x%x\n", armHwCapFlags);
return;
}

View File

@ -1096,7 +1096,7 @@ Simulator::setLastDebuggerInput(char *input)
void
Simulator::FlushICache(void *start_addr, size_t size)
{
IonSpewCont(IonSpew_CacheFlush, "[%p %zx]", start_addr, size);
JitSpewCont(JitSpew_CacheFlush, "[%p %zx]", start_addr, size);
if (!Simulator::ICacheCheckingEnabled)
return;
SimulatorRuntime *srt = TlsPerThreadData.get()->simulatorRuntime();

View File

@ -10,8 +10,8 @@
#include "jit/Bailouts.h"
#include "jit/IonFrames.h"
#include "jit/IonLinker.h"
#include "jit/IonSpewer.h"
#include "jit/JitCompartment.h"
#include "jit/JitSpewer.h"
#ifdef JS_ION_PERF
# include "jit/PerfSpewer.h"
#endif
@ -406,7 +406,7 @@ JitRuntime::generateInvalidator(JSContext *cx)
Linker linker(masm);
AutoFlushICache afc("Invalidator");
JitCode *code = linker.newCode<NoGC>(cx, OTHER_CODE);
IonSpew(IonSpew_Invalidate, " invalidation thunk created at %p", (void *) code->raw());
JitSpew(JitSpew_Invalidate, " invalidation thunk created at %p", (void *) code->raw());
#ifdef JS_ION_PERF
writePerfSpewerJitCodeProfile(code, "Invalidator");

View File

@ -13,8 +13,8 @@
#include "jit/CompactBuffer.h"
#include "jit/IonCode.h"
#include "jit/IonSpewer.h"
#include "jit/JitCompartment.h"
#include "jit/JitSpewer.h"
#include "jit/mips/Architecture-mips.h"
#include "jit/shared/Assembler-shared.h"
#include "jit/shared/IonAssemblerBuffer.h"

View File

@ -9,8 +9,8 @@
#include "jit/Bailouts.h"
#include "jit/IonFrames.h"
#include "jit/IonLinker.h"
#include "jit/IonSpewer.h"
#include "jit/JitCompartment.h"
#include "jit/JitSpewer.h"
#include "jit/mips/Bailouts-mips.h"
#include "jit/mips/BaselineHelpers-mips.h"
#ifdef JS_ION_PERF
@ -377,7 +377,7 @@ JitRuntime::generateInvalidator(JSContext *cx)
Linker linker(masm);
AutoFlushICache afc("Invalidator");
JitCode *code = linker.newCode<NoGC>(cx, OTHER_CODE);
IonSpew(IonSpew_Invalidate, " invalidation thunk created at %p", (void *) code->raw());
JitSpew(JitSpew_Invalidate, " invalidation thunk created at %p", (void *) code->raw());
#ifdef JS_ION_PERF
writePerfSpewerJitCodeProfile(code, "Invalidator");

View File

@ -7,9 +7,9 @@
#ifndef jit_none_Architecture_none_h
#define jit_none_Architecture_none_h
// IonSpewer.h is included through MacroAssembler implementations for other
// JitSpewer.h is included through MacroAssembler implementations for other
// platforms, so include it here to avoid inadvertent build bustage.
#include "jit/IonSpewer.h"
#include "jit/JitSpewer.h"
namespace js {
namespace jit {

View File

@ -39,7 +39,7 @@
#include "jsutil.h"
#include "jit/ExecutableAllocator.h"
#include "jit/IonSpewer.h"
#include "jit/JitSpewer.h"
#include "js/RootingAPI.h"
#define PRETTY_PRINT_OFFSET(os) (((os)<0)?"-":""), (((os)<0)?-(os):(os))
@ -287,7 +287,7 @@ namespace jit {
__attribute__ ((format (printf, 2, 3)))
#endif
{
if (printer || js::jit::IonSpewEnabled(js::jit::IonSpew_Codegen)) {
if (printer || js::jit::JitSpewEnabled(js::jit::JitSpew_Codegen)) {
// Buffer to hold the formatted string. Note that this may contain
// '%' characters, so do not pass it directly to printf functions.
char buf[200];
@ -300,7 +300,7 @@ namespace jit {
if (i > -1) {
if (printer)
printer->printf("%s\n", buf);
js::jit::IonSpew(js::jit::IonSpew_Codegen, "%s", buf);
js::jit::JitSpew(js::jit::JitSpew_Codegen, "%s", buf);
}
}
}
@ -310,7 +310,7 @@ namespace jit {
__attribute__ ((format (printf, 1, 2)))
#endif
{
if (js::jit::IonSpewEnabled(js::jit::IonSpew_Codegen)) {
if (js::jit::JitSpewEnabled(js::jit::JitSpew_Codegen)) {
char buf[200];
va_list va;
@ -319,7 +319,7 @@ namespace jit {
va_end(va);
if (i > -1)
js::jit::IonSpew(js::jit::IonSpew_Codegen, "%s", buf);
js::jit::JitSpew(js::jit::JitSpew_Codegen, "%s", buf);
}
}
};

View File

@ -11,8 +11,8 @@
#include "jit/CompactBuffer.h"
#include "jit/IonCaches.h"
#include "jit/IonMacroAssembler.h"
#include "jit/IonSpewer.h"
#include "jit/JitcodeMap.h"
#include "jit/JitSpewer.h"
#include "jit/MIR.h"
#include "jit/MIRGenerator.h"
#include "jit/ParallelFunctions.h"
@ -112,7 +112,7 @@ CodeGeneratorShared::generateOutOfLineCode()
if (!gen->alloc().ensureBallast())
return false;
IonSpew(IonSpew_Codegen, "# Emitting out of line code");
JitSpew(JitSpew_Codegen, "# Emitting out of line code");
masm.setFramePushed(outOfLineCode_[i]->framePushed());
lastPC_ = outOfLineCode_[i]->pc();
@ -174,7 +174,7 @@ CodeGeneratorShared::addNativeToBytecodeEntry(const BytecodeSite &site)
// bytecodeOffset, but the nativeOffset has changed, do nothing.
// The same site just generated some more code.
if (lastEntry.tree == tree && lastEntry.pc == pc) {
IonSpew(IonSpew_Profiling, " => In-place update [%u-%u]",
JitSpew(JitSpew_Profiling, " => In-place update [%u-%u]",
lastEntry.nativeOffset.offset(), nativeOffset);
return true;
}
@ -185,14 +185,14 @@ CodeGeneratorShared::addNativeToBytecodeEntry(const BytecodeSite &site)
if (lastEntry.nativeOffset.offset() == nativeOffset) {
lastEntry.tree = tree;
lastEntry.pc = pc;
IonSpew(IonSpew_Profiling, " => Overwriting zero-length native region.");
JitSpew(JitSpew_Profiling, " => Overwriting zero-length native region.");
// This overwrite might have made the entry merge-able with a
// previous one. If so, merge it.
if (lastIdx > 0) {
NativeToBytecode &nextToLastEntry = nativeToBytecodeList_[lastIdx - 1];
if (nextToLastEntry.tree == lastEntry.tree && nextToLastEntry.pc == lastEntry.pc) {
IonSpew(IonSpew_Profiling, " => Merging with previous region");
JitSpew(JitSpew_Profiling, " => Merging with previous region");
nativeToBytecodeList_.erase(&lastEntry);
}
}
@ -211,7 +211,7 @@ CodeGeneratorShared::addNativeToBytecodeEntry(const BytecodeSite &site)
if (!nativeToBytecodeList_.append(entry))
return false;
IonSpew(IonSpew_Profiling, " => Push new entry.");
JitSpew(JitSpew_Profiling, " => Push new entry.");
dumpNativeToBytecodeEntry(nativeToBytecodeList_.length() - 1);
return true;
}
@ -221,7 +221,7 @@ CodeGeneratorShared::dumpNativeToBytecodeEntries()
{
#ifdef DEBUG
InlineScriptTree *topTree = gen->info().inlineScriptTree();
IonSpewStart(IonSpew_Profiling, "Native To Bytecode Entries for %s:%d\n",
JitSpewStart(JitSpew_Profiling, "Native To Bytecode Entries for %s:%d\n",
topTree->script()->filename(), topTree->script()->lineno());
for (unsigned i = 0; i < nativeToBytecodeList_.length(); i++)
dumpNativeToBytecodeEntry(i);
@ -244,7 +244,7 @@ CodeGeneratorShared::dumpNativeToBytecodeEntry(uint32_t idx)
if (nextRef->tree == ref.tree)
pcDelta = nextRef->pc - ref.pc;
}
IonSpewStart(IonSpew_Profiling, " %08x [+%-6d] => %-6d [%-4d] {%-10s} (%s:%d",
JitSpewStart(JitSpew_Profiling, " %08x [+%-6d] => %-6d [%-4d] {%-10s} (%s:%d",
ref.nativeOffset.offset(),
nativeDelta,
ref.pc - script->code(),
@ -253,11 +253,11 @@ CodeGeneratorShared::dumpNativeToBytecodeEntry(uint32_t idx)
script->filename(), script->lineno());
for (tree = tree->caller(); tree; tree = tree->caller()) {
IonSpewCont(IonSpew_Profiling, " <= %s:%d", tree->script()->filename(),
JitSpewCont(JitSpew_Profiling, " <= %s:%d", tree->script()->filename(),
tree->script()->lineno());
}
IonSpewCont(IonSpew_Profiling, ")");
IonSpewFin(IonSpew_Profiling);
JitSpewCont(JitSpew_Profiling, ")");
JitSpewFin(JitSpew_Profiling);
#endif
}
@ -395,7 +395,7 @@ CodeGeneratorShared::encode(LRecoverInfo *recover)
return true;
uint32_t numInstructions = recover->numInstructions();
IonSpew(IonSpew_Snapshots, "Encoding LRecoverInfo %p (frameCount %u, instructions %u)",
JitSpew(JitSpew_Snapshots, "Encoding LRecoverInfo %p (frameCount %u, instructions %u)",
(void *)recover, recover->mir()->frameCount(), numInstructions);
MResumePoint::Mode mode = recover->mir()->mode();
@ -427,7 +427,7 @@ CodeGeneratorShared::encode(LSnapshot *snapshot)
RecoverOffset recoverOffset = recoverInfo->recoverOffset();
MOZ_ASSERT(recoverOffset != INVALID_RECOVER_OFFSET);
IonSpew(IonSpew_Snapshots, "Encoding LSnapshot %p (LRecover %p)",
JitSpew(JitSpew_Snapshots, "Encoding LSnapshot %p (LRecover %p)",
(void *)snapshot, (void*) recoverInfo);
SnapshotOffset offset = snapshots_.startSnapshot(recoverOffset, snapshot->bailoutKind());
@ -493,7 +493,7 @@ CodeGeneratorShared::assignBailoutId(LSnapshot *snapshot)
unsigned bailoutId = bailouts_.length();
snapshot->setBailoutId(bailoutId);
IonSpew(IonSpew_Snapshots, "Assigned snapshot bailout id %u", bailoutId);
JitSpew(JitSpew_Snapshots, "Assigned snapshot bailout id %u", bailoutId);
return bailouts_.append(snapshot->snapshotOffset());
}
@ -625,7 +625,7 @@ CodeGeneratorShared::generateCompactNativeToBytecodeMap(JSContext *cx, JitCode *
verifyCompactNativeToBytecodeMap(code);
IonSpew(IonSpew_Profiling, "Compact Native To Bytecode Map [%p-%p]",
JitSpew(JitSpew_Profiling, "Compact Native To Bytecode Map [%p-%p]",
data, data + nativeToBytecodeMapSize_);
return true;

View File

@ -9,7 +9,7 @@
#include "mozilla/DebugOnly.h"
#include "jit/IonSpewer.h"
#include "jit/JitSpewer.h"
#include "jit/shared/IonAssemblerBuffer.h"
// This code extends the AssemblerBuffer to support the pooling of values loaded
@ -504,9 +504,9 @@ struct AssemblerBufferWithConstantPools : public AssemblerBuffer<SliceSize, Inst
if (pool_.checkFull(poolOffset)) {
if (numPoolEntries)
IonSpew(IonSpew_Pools, "[%d] Inserting pool entry caused a spill", id);
JitSpew(JitSpew_Pools, "[%d] Inserting pool entry caused a spill", id);
else
IonSpew(IonSpew_Pools, "[%d] Inserting instruction(%d) caused a spill", id,
JitSpew(JitSpew_Pools, "[%d] Inserting instruction(%d) caused a spill", id,
sizeExcludingCurrentPool());
finishPool();
@ -538,15 +538,15 @@ struct AssemblerBufferWithConstantPools : public AssemblerBuffer<SliceSize, Inst
#ifdef DEBUG
if (numPoolEntries) {
IonSpew(IonSpew_Pools, "[%d] Inserting %d entries into pool", id, numPoolEntries);
IonSpewStart(IonSpew_Pools, "[%d] data is: 0x", id);
JitSpew(JitSpew_Pools, "[%d] Inserting %d entries into pool", id, numPoolEntries);
JitSpewStart(JitSpew_Pools, "[%d] data is: 0x", id);
size_t length = numPoolEntries * sizeof(PoolAllocUnit);
for (unsigned idx = 0; idx < length; idx++) {
IonSpewCont(IonSpew_Pools, "%02x", data[length - idx - 1]);
JitSpewCont(JitSpew_Pools, "%02x", data[length - idx - 1]);
if (((idx & 3) == 3) && (idx + 1 != length))
IonSpewCont(IonSpew_Pools, "_");
JitSpewCont(JitSpew_Pools, "_");
}
IonSpewFin(IonSpew_Pools);
JitSpewFin(JitSpew_Pools);
}
#endif
@ -557,7 +557,7 @@ struct AssemblerBufferWithConstantPools : public AssemblerBuffer<SliceSize, Inst
if (numPoolEntries) {
if (this->oom())
return BufferOffset();
IonSpew(IonSpew_Pools, "[%d] Entry has index %u, offset %u", id, index,
JitSpew(JitSpew_Pools, "[%d] Entry has index %u, offset %u", id, index,
sizeExcludingCurrentPool());
Asm::InsertIndexIntoTag(inst, index);
// Figure out the offset within the pool entries.
@ -598,12 +598,12 @@ struct AssemblerBufferWithConstantPools : public AssemblerBuffer<SliceSize, Inst
}
void finishPool() {
IonSpew(IonSpew_Pools, "[%d] Attempting to finish pool %d with %d entries.", id,
JitSpew(JitSpew_Pools, "[%d] Attempting to finish pool %d with %d entries.", id,
numDumps_, pool_.numEntries());
if (pool_.numEntries() == 0) {
// If there is no data in the pool being dumped, don't dump anything.
IonSpew(IonSpew_Pools, "[%d] Aborting because the pool is empty", id);
JitSpew(JitSpew_Pools, "[%d] Aborting because the pool is empty", id);
return;
}
@ -625,7 +625,7 @@ struct AssemblerBufferWithConstantPools : public AssemblerBuffer<SliceSize, Inst
BufferOffset perforation = this->nextOffset();
Parent::perforate();
perforatedSlice->isNatural = false;
IonSpew(IonSpew_Pools, "[%d] Adding a perforation at offset %d", id, perforation.getOffset());
JitSpew(JitSpew_Pools, "[%d] Adding a perforation at offset %d", id, perforation.getOffset());
// With the pool's final position determined it is now possible to patch
// the instructions that reference entries in this pool, and this is
@ -656,7 +656,7 @@ struct AssemblerBufferWithConstantPools : public AssemblerBuffer<SliceSize, Inst
// the pool entry that is being loaded. We need to do a non-trivial
// amount of math here, since the pool that we've made does not
// actually reside there in memory.
IonSpew(IonSpew_Pools, "[%d] Fixing entry %d offset to %u", id, idx,
JitSpew(JitSpew_Pools, "[%d] Fixing entry %d offset to %u", id, idx,
codeOffset - magicAlign);
Asm::PatchConstantPoolLoad(inst, (uint8_t *)inst + codeOffset - magicAlign);
}
@ -699,7 +699,7 @@ struct AssemblerBufferWithConstantPools : public AssemblerBuffer<SliceSize, Inst
void flushPool() {
if (this->oom())
return;
IonSpew(IonSpew_Pools, "[%d] Requesting a pool flush", id);
JitSpew(JitSpew_Pools, "[%d] Requesting a pool flush", id);
finishPool();
}
@ -715,7 +715,7 @@ struct AssemblerBufferWithConstantPools : public AssemblerBuffer<SliceSize, Inst
size_t poolOffset = sizeExcludingCurrentPool() + (maxInst + guardSize_ + headerSize_) * InstSize;
if (pool_.checkFull(poolOffset)) {
IonSpew(IonSpew_Pools, "[%d] No-Pool instruction(%d) caused a spill.", id,
JitSpew(JitSpew_Pools, "[%d] No-Pool instruction(%d) caused a spill.", id,
sizeExcludingCurrentPool());
finishPool();
}
@ -771,7 +771,7 @@ struct AssemblerBufferWithConstantPools : public AssemblerBuffer<SliceSize, Inst
+ (1 + guardSize_ + headerSize_) * InstSize;
if (pool_.checkFull(poolOffset)) {
// Alignment would cause a pool dump, so dump the pool now.
IonSpew(IonSpew_Pools, "[%d] Alignment of %d at %d caused a spill.", id, alignment,
JitSpew(JitSpew_Pools, "[%d] Alignment of %d at %d caused a spill.", id, alignment,
sizeExcludingCurrentPool());
finishPool();
}

View File

@ -10,8 +10,8 @@
#include "jit/BaselineJIT.h"
#include "jit/IonFrames.h"
#include "jit/IonLinker.h"
#include "jit/IonSpewer.h"
#include "jit/JitCompartment.h"
#include "jit/JitSpewer.h"
#ifdef JS_ION_PERF
# include "jit/PerfSpewer.h"
#endif
@ -345,7 +345,7 @@ JitRuntime::generateInvalidator(JSContext *cx)
Linker linker(masm);
JitCode *code = linker.newCode<NoGC>(cx, OTHER_CODE);
IonSpew(IonSpew_Invalidate, " invalidation thunk created at %p", (void *) code->raw());
JitSpew(JitSpew_Invalidate, " invalidation thunk created at %p", (void *) code->raw());
#ifdef JS_ION_PERF
writePerfSpewerJitCodeProfile(code, "Invalidator");

View File

@ -6214,37 +6214,37 @@ JS_SetGlobalJitCompilerOption(JSRuntime *rt, JSJitCompilerOption opt, uint32_t v
case JSJITCOMPILER_ION_ENABLE:
if (value == 1) {
JS::RuntimeOptionsRef(rt).setIon(true);
IonSpew(js::jit::IonSpew_Scripts, "Enable ion");
JitSpew(js::jit::JitSpew_Scripts, "Enable ion");
} else if (value == 0) {
JS::RuntimeOptionsRef(rt).setIon(false);
IonSpew(js::jit::IonSpew_Scripts, "Disable ion");
JitSpew(js::jit::JitSpew_Scripts, "Disable ion");
}
break;
case JSJITCOMPILER_BASELINE_ENABLE:
if (value == 1) {
JS::RuntimeOptionsRef(rt).setBaseline(true);
IonSpew(js::jit::IonSpew_BaselineScripts, "Enable baseline");
JitSpew(js::jit::JitSpew_BaselineScripts, "Enable baseline");
} else if (value == 0) {
JS::RuntimeOptionsRef(rt).setBaseline(false);
IonSpew(js::jit::IonSpew_BaselineScripts, "Disable baseline");
JitSpew(js::jit::JitSpew_BaselineScripts, "Disable baseline");
}
break;
case JSJITCOMPILER_OFFTHREAD_COMPILATION_ENABLE:
if (value == 1) {
rt->setOffthreadIonCompilationEnabled(true);
IonSpew(js::jit::IonSpew_Scripts, "Enable offthread compilation");
JitSpew(js::jit::JitSpew_Scripts, "Enable offthread compilation");
} else if (value == 0) {
rt->setOffthreadIonCompilationEnabled(false);
IonSpew(js::jit::IonSpew_Scripts, "Disable offthread compilation");
JitSpew(js::jit::JitSpew_Scripts, "Disable offthread compilation");
}
break;
case JSJITCOMPILER_SIGNALS_ENABLE:
if (value == 1) {
rt->setCanUseSignalHandlers(true);
IonSpew(js::jit::IonSpew_Scripts, "Enable signals");
JitSpew(js::jit::JitSpew_Scripts, "Enable signals");
} else if (value == 0) {
rt->setCanUseSignalHandlers(false);
IonSpew(js::jit::IonSpew_Scripts, "Disable signals");
JitSpew(js::jit::JitSpew_Scripts, "Disable signals");
}
break;
default:

View File

@ -168,9 +168,9 @@ UNIFIED_SOURCES += [
'jit/IonFrames.cpp',
'jit/IonMacroAssembler.cpp',
'jit/IonOptimizationLevels.cpp',
'jit/IonSpewer.cpp',
'jit/JitcodeMap.cpp',
'jit/JitOptions.cpp',
'jit/JitSpewer.cpp',
'jit/JSONSpewer.cpp',
'jit/LICM.cpp',
'jit/LinearScan.cpp',