forked from OSchip/llvm-project
Make merge-fdata generate smaller .fdata files.
Summary: A lot of the space in the merged .fdata is taken by branches to and from [heap], which is jitted code. On different machines, or during different runs, jitted addresses are all different. We don't use these addresses, but we need branch info to get accurate function call counts. This diff treats all [heap] addresses the same, resulting in a simplified merged file. The size of the compressed file decreased from 70MB to 8MB. (cherry picked from FBD3233943)
This commit is contained in:
parent
1258903b54
commit
de95a5b6a4
bolt
|
@ -37,7 +37,7 @@ struct Location {
|
|||
bool operator==(const Location &RHS) const {
|
||||
return IsSymbol == RHS.IsSymbol &&
|
||||
Name == RHS.Name &&
|
||||
Offset == RHS.Offset;
|
||||
(Name == "[heap]" || Offset == RHS.Offset);
|
||||
}
|
||||
|
||||
bool operator<(const Location &RHS) const {
|
||||
|
@ -49,6 +49,7 @@ struct Location {
|
|||
|
||||
return IsSymbol == RHS.IsSymbol &&
|
||||
Name == RHS.Name &&
|
||||
Name != "[heap]" &&
|
||||
Offset < RHS.Offset;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue