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:
Maksim Panchenko 2016-04-27 18:06:18 -07:00
parent 1258903b54
commit de95a5b6a4
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}
};