mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-04 07:40:42 +00:00
Bug 983598 part 2 - Rename trackFrame to trackSnapshot. r=jandem
This commit is contained in:
parent
0fcbaa354a
commit
3031483183
@ -482,6 +482,14 @@ SnapshotReader::readSnapshotHeader()
|
||||
resumeAfter_ = !!(bits & (1 << BAILOUT_RESUME_SHIFT));
|
||||
framesRead_ = 0;
|
||||
|
||||
#ifdef TRACK_SNAPSHOTS
|
||||
pcOpcode_ = reader_.readUnsigned();
|
||||
mirOpcode_ = reader_.readUnsigned();
|
||||
mirId_ = reader_.readUnsigned();
|
||||
lirOpcode_ = reader_.readUnsigned();
|
||||
lirId_ = reader_.readUnsigned();
|
||||
#endif
|
||||
|
||||
IonSpew(IonSpew_Snapshots, "Read snapshot header with frameCount %u, bailout kind %u (ra: %d)",
|
||||
frameCount_, bailoutKind_, resumeAfter_);
|
||||
}
|
||||
@ -494,13 +502,6 @@ SnapshotReader::readFrameHeader()
|
||||
|
||||
pcOffset_ = reader_.readUnsigned();
|
||||
allocCount_ = reader_.readUnsigned();
|
||||
#ifdef TRACK_SNAPSHOTS
|
||||
pcOpcode_ = reader_.readUnsigned();
|
||||
mirOpcode_ = reader_.readUnsigned();
|
||||
mirId_ = reader_.readUnsigned();
|
||||
lirOpcode_ = reader_.readUnsigned();
|
||||
lirId_ = reader_.readUnsigned();
|
||||
#endif
|
||||
IonSpew(IonSpew_Snapshots, "Read pc offset %u, nslots %u", pcOffset_, allocCount_);
|
||||
|
||||
framesRead_++;
|
||||
@ -592,8 +593,8 @@ SnapshotWriter::startFrame(JSFunction *fun, JSScript *script, jsbytecode *pc, ui
|
||||
|
||||
#ifdef TRACK_SNAPSHOTS
|
||||
void
|
||||
SnapshotWriter::trackFrame(uint32_t pcOpcode, uint32_t mirOpcode, uint32_t mirId,
|
||||
uint32_t lirOpcode, uint32_t lirId)
|
||||
SnapshotWriter::trackSnapshot(uint32_t pcOpcode, uint32_t mirOpcode, uint32_t mirId,
|
||||
uint32_t lirOpcode, uint32_t lirId)
|
||||
{
|
||||
writer_.writeUnsigned(pcOpcode);
|
||||
writer_.writeUnsigned(mirOpcode);
|
||||
|
@ -326,11 +326,11 @@ class SnapshotWriter
|
||||
bool init();
|
||||
|
||||
SnapshotOffset startSnapshot(uint32_t frameCount, BailoutKind kind, bool resumeAfter);
|
||||
void startFrame(JSFunction *fun, JSScript *script, jsbytecode *pc, uint32_t exprStack);
|
||||
#ifdef TRACK_SNAPSHOTS
|
||||
void trackFrame(uint32_t pcOpcode, uint32_t mirOpcode, uint32_t mirId,
|
||||
uint32_t lirOpcode, uint32_t lirId);
|
||||
void trackSnapshot(uint32_t pcOpcode, uint32_t mirOpcode, uint32_t mirId,
|
||||
uint32_t lirOpcode, uint32_t lirId);
|
||||
#endif
|
||||
void startFrame(JSFunction *fun, JSScript *script, jsbytecode *pc, uint32_t exprStack);
|
||||
void endFrame();
|
||||
|
||||
bool add(const RValueAllocation &slot);
|
||||
|
@ -250,6 +250,26 @@ CodeGeneratorShared::encode(LSnapshot *snapshot)
|
||||
SnapshotOffset offset = snapshots_.startSnapshot(frameCount, snapshot->bailoutKind(),
|
||||
resumeAfter);
|
||||
|
||||
#ifdef TRACK_SNAPSHOTS
|
||||
uint32_t pcOpcode = 0;
|
||||
uint32_t lirOpcode = 0;
|
||||
uint32_t lirId = 0;
|
||||
uint32_t mirOpcode = 0;
|
||||
uint32_t mirId = 0;
|
||||
|
||||
if (LInstruction *ins = instruction()) {
|
||||
lirOpcode = ins->op();
|
||||
lirId = ins->id();
|
||||
if (ins->mirRaw()) {
|
||||
mirOpcode = ins->mirRaw()->op();
|
||||
mirId = ins->mirRaw()->id();
|
||||
if (ins->mirRaw()->trackedPc())
|
||||
pcOpcode = *ins->mirRaw()->trackedPc();
|
||||
}
|
||||
}
|
||||
snapshots_.trackSnapshot(pcOpcode, mirOpcode, mirId, lirOpcode, lirId);
|
||||
#endif
|
||||
|
||||
FlattenedMResumePointIter mirOperandIter(snapshot->mir());
|
||||
if (!mirOperandIter.init())
|
||||
return false;
|
||||
@ -305,28 +325,6 @@ CodeGeneratorShared::encode(LSnapshot *snapshot)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef TRACK_SNAPSHOTS
|
||||
LInstruction *ins = instruction();
|
||||
|
||||
uint32_t pcOpcode = 0;
|
||||
uint32_t lirOpcode = 0;
|
||||
uint32_t lirId = 0;
|
||||
uint32_t mirOpcode = 0;
|
||||
uint32_t mirId = 0;
|
||||
|
||||
if (ins) {
|
||||
lirOpcode = ins->op();
|
||||
lirId = ins->id();
|
||||
if (ins->mirRaw()) {
|
||||
mirOpcode = ins->mirRaw()->op();
|
||||
mirId = ins->mirRaw()->id();
|
||||
if (ins->mirRaw()->trackedPc())
|
||||
pcOpcode = *ins->mirRaw()->trackedPc();
|
||||
}
|
||||
}
|
||||
snapshots_.trackFrame(pcOpcode, mirOpcode, mirId, lirOpcode, lirId);
|
||||
#endif
|
||||
|
||||
if (!encodeAllocations(snapshot, mir, &startIndex))
|
||||
return false;
|
||||
snapshots_.endFrame();
|
||||
|
Loading…
x
Reference in New Issue
Block a user