Improve matching of file-backed memory mappings
authorMark Drayton <mbd@fb.com>
Wed, 22 Feb 2017 02:05:10 +0000 (02:05 +0000)
committerMark Drayton <mbd@fb.com>
Wed, 22 Feb 2017 04:21:13 +0000 (04:21 +0000)
commit13685088acd99da74da5c560f7d2fc394dc5669e
tree8f9540eb62fed090c847722f44ad5a0cc9ddcf23
parent02884a026578fec59a575942d46ea50b081adcb0
Improve matching of file-backed memory mappings

Use the same rules as perf to determine if a mapping in /proc/pid/maps is
file-backed. This allows mappings in anonymous huge pages and so on to fall
back to resolving from /tmp/perf-pid.map, if appropriate.

ref: http://lxr.free-electrons.com/source/tools/perf/util/map.c#L28
src/cc/bcc_proc.c
src/cc/bcc_proc.h
tests/cc/test_c_api.cc