void GraphSpewer::init(MIRGraph* graph, JSScript* function) { MOZ_ASSERT(!isSpewing()); if (!ionspewer.isEnabled()) return; if (!FilterContainsLocation(function)) { // filter out logs during the compilation. filteredOutCompilations++; MOZ_ASSERT(!isSpewing()); return; } graph_ = graph; MOZ_ASSERT(isSpewing()); }
void GraphSpewer::endFunction() { if (!ionspewer.isEnabled()) return; if (!isSpewing()) { MOZ_ASSERT(filteredOutCompilations != 0); filteredOutCompilations--; return; } c1Spewer_.endFunction(); jsonSpewer_.endFunction(); ionspewer.endFunction(this); graph_ = nullptr; }