profile: Don't try to be clever in SharedImage::ContainsAddress().
The data section could theoretically be before the text section, but it also may not exist and have a size of 0. The commpage image is one such image with those qualities, and so we would thus always find it as having a hit when encountering it in the list. And since data_size might be 0, just do < instead of <= and -1. This massively fixes the profiler's output.
This commit is contained in:
@@ -106,8 +106,8 @@ SharedImage::SymbolCount() const
|
||||
bool
|
||||
SharedImage::ContainsAddress(addr_t address) const
|
||||
{
|
||||
return address >= (addr_t)fInfo.text
|
||||
&& address <= (addr_t)fInfo.data + fInfo.data_size - 1;
|
||||
return (address >= (addr_t)fInfo.text && address < ((addr_t)fInfo.text + fInfo.text_size))
|
||||
|| (address >= (addr_t)fInfo.data && address < ((addr_t)fInfo.data + fInfo.data_size));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user