Commit ff020d9
committed
[BOLT] Fix heatmaps on large BOLTE'd binaries.
Large binaries get two text segments mapped when loaded in memory, ie:
```
2f7200000-2fabca000 r--p 00000000 bolted-binary <- 1st text segment
2fabd9000-2fe47c000 r-xp 039c9000 bolted-binary
2fe48b000-2fe61d000 r--p 0727b000 bolted-binary
2fe62c000-2fe660000 rw-p 0740c000 bolted-binary
2fe660000-2fea4c000 rw-p 00000000
2fec00000-303dad000 r-xp 07a00000 bolted-binary <- 2nd. only on bolted binary
```
BOLT processes only the first, which is not having a correct BaseAddress,
causing a wrong computation of a BinaryMMapInfo's size.
Consequently, BOLT wrongly thinks that many of the samples fall outside
the binary and ignores them. As a result, the computed heatmap is
incomplete, and the section hotness statistics are wrong.
This bug is present in both the AArch64 and x86 backends.1 parent d782119 commit ff020d9
1 file changed
+15
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2009 | 2009 | | |
2010 | 2010 | | |
2011 | 2011 | | |
2012 | | - | |
2013 | | - | |
2014 | | - | |
2015 | 2012 | | |
2016 | 2013 | | |
2017 | 2014 | | |
| |||
2067 | 2064 | | |
2068 | 2065 | | |
2069 | 2066 | | |
2070 | | - | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
| 2075 | + | |
| 2076 | + | |
| 2077 | + | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
2071 | 2082 | | |
2072 | 2083 | | |
2073 | 2084 | | |
| |||
0 commit comments