On Fri, Aug 17, 2007 at 06:05:20AM +0800, Fengguang Wu wrote: > Show a process's page-by-page address space infomation in /proc/<pid>/pmaps. > It helps to analyze applications' memory footprints in a comprehensive way. > > Pages share the same states are grouped into a page range. > For each page range, the following fields are exported: > - first page index > - number of pages in the range > - well known page/pte flags > - number of mmap users > > Only page flags not expected to disappear in the near future are exported: > > Y:young R:referenced A:active U:uptodate P:ptedirty D:dirty W:writeback ...
> The concern of dataset size is taken care of by working in a sparse way: > > 1) It will only generate output for resident pages, that normally is > much smaller than the mapped size. Take my shell for example, the > (size:rss) ratio is (7:1)! > > wfg ~% cat /proc/$$/smaps |grep Size|sum > sum 50552.000 > avg 777.723 > > wfg ~% cat /proc/$$/smaps |grep Rss|sum > sum 7604.000 > avg 116.985 > > 2) The page range trick suppresses more output. > > It's interesting to see that the seq_file interface demands some > more programming efforts, and provides such flexibility as well. I'm so-so on this. On the downside: - requires lots of parsing - isn't random-access - probably significantly slower than pagemap -- Mathematics is the supreme nostalgia of our time. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/