зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1026905 - IonMonkey: remove the instruction counters from the script counters. r=bhackett
This commit is contained in:
Родитель
6ffd232e45
Коммит
155fe27264
|
@ -3211,19 +3211,9 @@ struct ScriptCountBlockState
|
|||
|
||||
Sprinter printer;
|
||||
|
||||
uint32_t instructionBytes;
|
||||
uint32_t spillBytes;
|
||||
|
||||
// Pointer to instructionBytes, spillBytes, or nullptr, depending on the
|
||||
// last instruction processed.
|
||||
uint32_t *last;
|
||||
uint32_t lastLength;
|
||||
|
||||
public:
|
||||
ScriptCountBlockState(IonBlockCounts *block, MacroAssembler *masm)
|
||||
: block(*block), masm(*masm),
|
||||
printer(GetIonContext()->cx),
|
||||
instructionBytes(0), spillBytes(0), last(nullptr), lastLength(0)
|
||||
: block(*block), masm(*masm), printer(GetIonContext()->cx)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -3245,11 +3235,6 @@ struct ScriptCountBlockState
|
|||
|
||||
void visitInstruction(LInstruction *ins)
|
||||
{
|
||||
if (last)
|
||||
*last += masm.size() - lastLength;
|
||||
lastLength = masm.size();
|
||||
last = ins->isMoveGroup() ? &spillBytes : &instructionBytes;
|
||||
|
||||
// Prefix stream of assembly instructions with their LIR instruction
|
||||
// name and any associated high level info.
|
||||
if (const char *extra = ins->extraName())
|
||||
|
@ -3262,12 +3247,7 @@ struct ScriptCountBlockState
|
|||
{
|
||||
masm.setPrinter(nullptr);
|
||||
|
||||
if (last)
|
||||
*last += masm.size() - lastLength;
|
||||
|
||||
block.setCode(printer.string());
|
||||
block.setInstructionBytes(instructionBytes);
|
||||
block.setSpillBytes(spillBytes);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -637,11 +637,6 @@ struct IonBlockCounts
|
|||
// Text information about the code generated for this block.
|
||||
char *code_;
|
||||
|
||||
// Number of bytes of code generated in this block. Spill code is counted
|
||||
// separately from other, instruction implementing code.
|
||||
uint32_t instructionBytes_;
|
||||
uint32_t spillBytes_;
|
||||
|
||||
public:
|
||||
|
||||
bool init(uint32_t id, uint32_t offset, uint32_t numSuccessors) {
|
||||
|
@ -702,22 +697,6 @@ struct IonBlockCounts
|
|||
const char *code() const {
|
||||
return code_;
|
||||
}
|
||||
|
||||
void setInstructionBytes(uint32_t bytes) {
|
||||
instructionBytes_ = bytes;
|
||||
}
|
||||
|
||||
uint32_t instructionBytes() const {
|
||||
return instructionBytes_;
|
||||
}
|
||||
|
||||
void setSpillBytes(uint32_t bytes) {
|
||||
spillBytes_ = bytes;
|
||||
}
|
||||
|
||||
uint32_t spillBytes() const {
|
||||
return spillBytes_;
|
||||
}
|
||||
};
|
||||
|
||||
// Execution information for a compiled script which may persist after the
|
||||
|
|
|
@ -230,8 +230,7 @@ js::DumpIonScriptCounts(Sprinter *sp, jit::IonScriptCounts *ionCounts)
|
|||
Sprint(sp, "BB #%lu [%05u]", block.id(), block.offset());
|
||||
for (size_t j = 0; j < block.numSuccessors(); j++)
|
||||
Sprint(sp, " -> #%lu", block.successor(j));
|
||||
Sprint(sp, " :: %llu hits %u instruction bytes %u spill bytes\n",
|
||||
block.hitCount(), block.instructionBytes(), block.spillBytes());
|
||||
Sprint(sp, " :: %llu hits\n", block.hitCount());
|
||||
Sprint(sp, "%s\n", block.code());
|
||||
}
|
||||
}
|
||||
|
@ -2317,13 +2316,6 @@ GetPCCountJSON(JSContext *cx, const ScriptAndCounts &sac, StringBuffer &buf)
|
|||
if (!str || !(str = StringToSource(cx, str)))
|
||||
return false;
|
||||
buf.append(str);
|
||||
|
||||
AppendJSONProperty(buf, "instructionBytes");
|
||||
NumberValueToStringBuffer(cx, Int32Value(block.instructionBytes()), buf);
|
||||
|
||||
AppendJSONProperty(buf, "spillBytes");
|
||||
NumberValueToStringBuffer(cx, Int32Value(block.spillBytes()), buf);
|
||||
|
||||
buf.append('}');
|
||||
}
|
||||
buf.append(']');
|
||||
|
|
Загрузка…
Ссылка в новой задаче