diff options
Diffstat (limited to 'fs/proc/task_mmu.c')
-rw-r--r-- | fs/proc/task_mmu.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 871e25ed0069..da6b01d70f01 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c | |||
@@ -327,6 +327,7 @@ struct mem_size_stats { | |||
327 | unsigned long private_clean; | 327 | unsigned long private_clean; |
328 | unsigned long private_dirty; | 328 | unsigned long private_dirty; |
329 | unsigned long referenced; | 329 | unsigned long referenced; |
330 | unsigned long anonymous; | ||
330 | unsigned long swap; | 331 | unsigned long swap; |
331 | u64 pss; | 332 | u64 pss; |
332 | }; | 333 | }; |
@@ -357,6 +358,9 @@ static int smaps_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end, | |||
357 | if (!page) | 358 | if (!page) |
358 | continue; | 359 | continue; |
359 | 360 | ||
361 | if (PageAnon(page)) | ||
362 | mss->anonymous += PAGE_SIZE; | ||
363 | |||
360 | mss->resident += PAGE_SIZE; | 364 | mss->resident += PAGE_SIZE; |
361 | /* Accumulate the size in pages that have been accessed. */ | 365 | /* Accumulate the size in pages that have been accessed. */ |
362 | if (pte_young(ptent) || PageReferenced(page)) | 366 | if (pte_young(ptent) || PageReferenced(page)) |
@@ -410,6 +414,7 @@ static int show_smap(struct seq_file *m, void *v) | |||
410 | "Private_Clean: %8lu kB\n" | 414 | "Private_Clean: %8lu kB\n" |
411 | "Private_Dirty: %8lu kB\n" | 415 | "Private_Dirty: %8lu kB\n" |
412 | "Referenced: %8lu kB\n" | 416 | "Referenced: %8lu kB\n" |
417 | "Anonymous: %8lu kB\n" | ||
413 | "Swap: %8lu kB\n" | 418 | "Swap: %8lu kB\n" |
414 | "KernelPageSize: %8lu kB\n" | 419 | "KernelPageSize: %8lu kB\n" |
415 | "MMUPageSize: %8lu kB\n", | 420 | "MMUPageSize: %8lu kB\n", |
@@ -421,6 +426,7 @@ static int show_smap(struct seq_file *m, void *v) | |||
421 | mss.private_clean >> 10, | 426 | mss.private_clean >> 10, |
422 | mss.private_dirty >> 10, | 427 | mss.private_dirty >> 10, |
423 | mss.referenced >> 10, | 428 | mss.referenced >> 10, |
429 | mss.anonymous >> 10, | ||
424 | mss.swap >> 10, | 430 | mss.swap >> 10, |
425 | vma_kernel_pagesize(vma) >> 10, | 431 | vma_kernel_pagesize(vma) >> 10, |
426 | vma_mmu_pagesize(vma) >> 10); | 432 | vma_mmu_pagesize(vma) >> 10); |