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

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 29 13:59:10 PDT 2021


wlei added a comment.

In D107097#2914634 <https://reviews.llvm.org/D107097#2914634>, @hoy wrote:

> 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.

Oh, I see, you mean if turn on `--show-mmap-events`, it will always have the leading mmap event, otherwise it's the invalid input? I indeed haven't seen the third case before. If so, that makes sense to use preferred address when without leading mmaps.


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