Lines Matching refs:WC
217 const std::string &TestFilename, WriterContext *WC, in overlapInput() argument
226 WC->Errors.emplace_back(make_error<InstrProfError>(IPE), TestFilename); in overlapInput()
235 WC->Writer.overlapRecord(std::move(I), Overlap, FuncOverlap, FuncFilter); in overlapInput()
243 const StringRef ProfiledBinary, WriterContext *WC) { in loadInput() argument
244 std::unique_lock<std::mutex> CtxGuard{WC->Lock}; in loadInput()
260 if (Error E = WC->Writer.mergeProfileKind(Reader->getProfileKind())) { in loadInput()
262 WC->Errors.emplace_back( in loadInput()
272 WC->Errors.emplace_back(make_error<InstrProfError>(IPE), Filename); in loadInput()
278 bool Succeeded = WC->Writer.addMemProfFrame( in loadInput()
288 WC->Writer.addMemProfRecord(/*Id=*/I.first, /*Record=*/I.second); in loadInput()
298 WC->Errors.emplace_back(make_error<InstrProfError>(IPE), Filename); in loadInput()
303 if (Error E = WC->Writer.mergeProfileKind(Reader->getProfileKind())) { in loadInput()
305 WC->Errors.emplace_back( in loadInput()
318 WC->Writer.addRecord(std::move(I), Input.Weight, [&](Error E) { in loadInput()
326 std::unique_lock<std::mutex> ErrGuard{WC->ErrLock}; in loadInput()
327 bool firstTime = WC->WriterErrorCodes.insert(IPE).second; in loadInput()
334 WC->Errors.emplace_back(std::move(E), Filename); in loadInput()
448 for (std::unique_ptr<WriterContext> &WC : Contexts) { in mergeInstrProfile()
449 for (auto &ErrorPair : WC->Errors) { in mergeInstrProfile()
536 adjustInstrProfile(std::unique_ptr<WriterContext> &WC, in adjustInstrProfile() argument
543 for (auto &PD : WC->Writer.getProfileData()) { in adjustInstrProfile()
635 auto WC = std::make_unique<WriterContext>(OutputSparse, ErrorLock, in supplementInstrProfile() local
637 loadInput(Inputs[0], nullptr, nullptr, /*ProfiledBinary=*/"", WC.get()); in supplementInstrProfile()
638 if (WC->Errors.size() > 0) in supplementInstrProfile()
639 exitWithError(std::move(WC->Errors[0].first), InstrFilename); in supplementInstrProfile()
641 adjustInstrProfile(WC, Reader, SupplMinSizeThreshold, ZeroCounterThreshold, in supplementInstrProfile()
643 writeInstrProfile(OutputFilename, OutputFormat, WC->Writer); in supplementInstrProfile()