forked from OSchip/llvm-project
parent
371290790f
commit
8dd4ca819b
|
@ -398,6 +398,10 @@ uint64_t InstrProfRecord::remapValue(uint64_t Value, uint32_t ValueKind,
|
||||||
std::lower_bound(ValueMap->begin(), ValueMap->end(), Value,
|
std::lower_bound(ValueMap->begin(), ValueMap->end(), Value,
|
||||||
[](const std::pair<uint64_t, uint64_t> &LHS,
|
[](const std::pair<uint64_t, uint64_t> &LHS,
|
||||||
uint64_t RHS) { return LHS.first < RHS; });
|
uint64_t RHS) { return LHS.first < RHS; });
|
||||||
|
// Raw function pointer collected by value profiler may be from
|
||||||
|
// external functions that are not instrumented. They won't have
|
||||||
|
// mapping data to be used by the deserializer. Force the value to
|
||||||
|
// be 0 in this case.
|
||||||
if (Result != ValueMap->end() && Result->first == Value)
|
if (Result != ValueMap->end() && Result->first == Value)
|
||||||
Value = (uint64_t)Result->second;
|
Value = (uint64_t)Result->second;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue