Bug 1656100 - Add CacheIROps to JSON. r=jandem

Depends on D85805

Differential Revision: https://phabricator.services.mozilla.com/D85806
This commit is contained in:
caroline 2020-08-05 08:06:31 +00:00
Родитель 8290b5853f
Коммит fc704b608e
1 изменённых файлов: 7 добавлений и 1 удалений

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

@ -19,20 +19,26 @@ bool CacheIRHealth::spewStubHealth(AutoStructuredSpewer& spew, ICStub* stub) {
CacheIRReader stubReader(stubInfo);
uint32_t totalStubHealth = 0;
spew->beginListProperty("cacheIROps");
while (stubReader.more()) {
CacheOp op = stubReader.readOp();
uint32_t opHealth = CacheIROpHealth[size_t(op)];
uint32_t argLength = CacheIROpArgLengths[size_t(op)];
const char* opName = CacheIROpNames[size_t(op)];
spew->beginObject();
if (opHealth == UINT32_MAX) {
const char* opName = CacheIROpNames[size_t(op)];
spew->property("unscoredOp", opName);
} else {
spew->property("cacheIROp", opName);
spew->property("opHealth", opHealth);
totalStubHealth += opHealth;
}
spew->endObject();
stubReader.skip(argLength);
}
spew->endList(); // cacheIROps
spew->property("stubHealth", totalStubHealth);
return true;