awslabs / damo

DAMON user-space tool
https://damonitor.github.io/
GNU General Public License v2.0
148 stars 28 forks source link

No brk region information #57

Closed DanielLee343 closed 1 year ago

DanielLee343 commented 1 year ago

Hi,

I observed a side problem when doing the HPC profiling using damo. Specifically, I intercept both mmap() and brk() syscalls and compare with DAMON's heatmap. I found DAMON does not capture brk-ed addresses regions. For example, I print the abs_addr of the damon.data, which spans from 140737310404608 to 140737488261635, and matches with the heatmap figure. However, I observed there are also frequent accesses from brk-ed regions eg., 10125312 to 18046976 but that's not captured by DAMON. Is there any specific reason or overhead for that? Thanks!

sj-aws commented 1 year ago

Hi,

In virtual address spaces monitoring case, DAMON tries to find three big mapped areas of each process by default[1]. Because the three areas are separated by huge two gaps, visualizing the entire address space usually results in only black screen, because the graph is dominated by the two gaps. damo-report-heats hence find the three mapped areas and use biggest one among those as abs_addr by default. You would be able to find other two regions from your record file, and pass the address range to damo with --abs_addr option to show visualization of the address range (e.g., the brk region). You could get more hints with damo report heats --guide command, which shows you the three regions.

Hope this answers to your question.

[1] https://www.kernel.org/doc/html/next/mm/damon/design.html#vma-based-target-address-range-construction

DanielLee343 commented 1 year ago

Thanks!