On 13 July 2016 at 10:35, Al Grant Al.Grant@arm.com wrote:
Hi,
When you see the libraries being mapped multiple times, are you just seeing the code and data segments? I see that too, I just ignore the data segments.
(Taking the liberty of CC'ing the list as this is probably a topic of interest)
Each time a library is mapped perf gets notified by the mm subsystem. Part of the notification is a new vm_area_struct that contains the new start address of the library (vm_area_struct::vm_start). Upon receiving the notification the new address is communicated to the ETM drivers which do the required filter configuration. That is all good and working well.
On ARM64 (because I _assume_ X86 folks didn't see this) we get 3 notifications. For example notification A will have address 0x7f93a60000 while, subsequently, notification B and C address 0x7f93a70000. Note that the latter two are 64K higher than the first one.
Once the last notification has been received the code in the main program is executed. That code (in the main program) jumps to library code mapped at the address it got from the first notification and not the last one, making the filter configuration all wrong.
As such I have to understand what notification B and C are for. Based on the vm_area_struct::vm_flags I'm guessing some sort of accounting feature but not sure yet. If I ignore notification B and C, things work amazingly well and one can really see the power offered by coresight.
That's where I'm at now.
Get back to me if you (or anyone else) want more information.
Mathieu
Al IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.