[PATCH] D107097: [llvm-profgen] An option to ignore parsing MMap events

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 29 13:53:00 PDT 2021


hoy added a comment.

In D107097#2914616 <https://reviews.llvm.org/D107097#2914616>, @wlei wrote:

> In D107097#2914552 <https://reviews.llvm.org/D107097#2914552>, @hoy wrote:
>
>> In D107097#2914528 <https://reviews.llvm.org/D107097#2914528>, @wlei wrote:
>>
>>> In D107097#2914487 <https://reviews.llvm.org/D107097#2914487>, @hoy wrote:
>>>
>>>> Can the mmap events be treated as optional, so when they present we parse them otherwise just move forward to other events?
>>>
>>> That might have issues with the leading samples before we meet a MMAP, they won't know which binary it belongs to. Currently If not specify `ignore-mmap-events`, we will always check the `Addr2Binary` table which is empty without mmap events parsed.
>>
>> Can this be fixed? Without mmap events we can just use the preferred address as the load address.
>>
>> It sounds a bit unclear to me by giving `ignore-mmap-events` when the map events are there. That means we basically do not trust those events.
>
> Understood! My concern is if the scripts has mmap events and only the leading sample missed the load address, they still can be loaded at a different base address which is not the preferred address. it's wrong base address in that case,

If that's a real case, we'll need to fix that. For now I think we want to cover to cases: 1. with leading mmaps 2. without leading mmaps (assuming the preferred address is the real load address). Have you seen a third case? I'm wondering if the input is invalid.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107097/new/

https://reviews.llvm.org/D107097



More information about the llvm-commits mailing list