Lines Matching full:probe
1 //===- SampleProfileProbe.cpp - Pseudo probe Instrumentation -------------===//
38 #define DEBUG_TYPE "pseudo-probe"
44 VerifyPseudoProbe("verify-pseudo-probe", cl::init(false), cl::Hidden,
45 cl::desc("Do pseudo probe verification"));
48 "verify-pseudo-probe-funcs", cl::Hidden,
52 UpdatePseudoProbe("update-pseudo-probe", cl::init(true), cl::Hidden,
53 cl::desc("Update pseudo probe distribution factor"));
98 "\n*** Pseudo Probe Verification After " + PassID.str() + " ***\n";
139 if (std::optional<PseudoProbe> Probe = extractProbe(I)) {
141 ProbeFactors[{Probe->Id, Hash}] += Probe->Factor;
160 dbgs() << "Probe " << I.first.first << "\tprevious factor "
191 // This discrepancy in probe ID could cause profile mismatching issues.
205 // Handle the call-to-invoke conversion case: make sure that the probe id and
207 // probe, we only keep the head block probe id and ignore the block ids of the
208 // normal dests. For callsite probe, it's different to block probe, there is
224 // only instrument probe in the head block, ignore the normal dests.
347 // Since the GUID from probe desc and inline stack are computed separately, we
358 // Assign an artificial debug line to a probe that doesn't come with a real
359 // line. A probe not having a debug line will get an incomplete inline
360 // context. This will cause samples collected on the probe to be counted
365 "Expecting pseudo probe or call instructions");
373 << " Probe gets an artificial debug line\n";
380 // Probe basic blocks.
384 // Insert a probe before an instruction with a valid debug line number which
385 // will be assigned to the probe. The line number will be used later to
386 // model the inline context when the probe is inlined into other functions.
408 auto *Probe = Builder.CreateCall(ProbeFn, Args);
409 AssignDebugLoc(Probe);
412 if (auto DIL = Probe->getDebugLoc()) {
415 Probe->setDebugLoc(DIL);
420 // Probe both direct calls and indirect calls. Direct calls are probed so that
421 // their probe ID can be used as an call site identifier to represent a
432 // and type of a callsite probe. This gets rid of the dependency on
443 // synthesize probe-based sample counts, which are
457 // Create the pseudo probe desc metadata beforehand.
479 // Collect the sum of execution weight for each probe.
483 if (std::optional<PseudoProbe> Probe = extractProbe(I)) {
485 ProbeFactors[{Probe->Id, Hash}] += BBProfileCount(&Block);
493 if (std::optional<PseudoProbe> Probe = extractProbe(I)) {
495 float Sum = ProbeFactors[{Probe->Id, Hash}];