aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/task_mmu.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 375581276011..183f8ff5f400 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -16,7 +16,7 @@
16 16
17void task_mem(struct seq_file *m, struct mm_struct *mm) 17void task_mem(struct seq_file *m, struct mm_struct *mm)
18{ 18{
19 unsigned long data, text, lib; 19 unsigned long data, text, lib, swap;
20 unsigned long hiwater_vm, total_vm, hiwater_rss, total_rss; 20 unsigned long hiwater_vm, total_vm, hiwater_rss, total_rss;
21 21
22 /* 22 /*
@@ -36,6 +36,7 @@ void task_mem(struct seq_file *m, struct mm_struct *mm)
36 data = mm->total_vm - mm->shared_vm - mm->stack_vm; 36 data = mm->total_vm - mm->shared_vm - mm->stack_vm;
37 text = (PAGE_ALIGN(mm->end_code) - (mm->start_code & PAGE_MASK)) >> 10; 37 text = (PAGE_ALIGN(mm->end_code) - (mm->start_code & PAGE_MASK)) >> 10;
38 lib = (mm->exec_vm << (PAGE_SHIFT-10)) - text; 38 lib = (mm->exec_vm << (PAGE_SHIFT-10)) - text;
39 swap = get_mm_counter(mm, MM_SWAPENTS);
39 seq_printf(m, 40 seq_printf(m,
40 "VmPeak:\t%8lu kB\n" 41 "VmPeak:\t%8lu kB\n"
41 "VmSize:\t%8lu kB\n" 42 "VmSize:\t%8lu kB\n"
@@ -46,7 +47,8 @@ void task_mem(struct seq_file *m, struct mm_struct *mm)
46 "VmStk:\t%8lu kB\n" 47 "VmStk:\t%8lu kB\n"
47 "VmExe:\t%8lu kB\n" 48 "VmExe:\t%8lu kB\n"
48 "VmLib:\t%8lu kB\n" 49 "VmLib:\t%8lu kB\n"
49 "VmPTE:\t%8lu kB\n", 50 "VmPTE:\t%8lu kB\n"
51 "VmSwap:\t%8lu kB\n",
50 hiwater_vm << (PAGE_SHIFT-10), 52 hiwater_vm << (PAGE_SHIFT-10),
51 (total_vm - mm->reserved_vm) << (PAGE_SHIFT-10), 53 (total_vm - mm->reserved_vm) << (PAGE_SHIFT-10),
52 mm->locked_vm << (PAGE_SHIFT-10), 54 mm->locked_vm << (PAGE_SHIFT-10),
@@ -54,7 +56,8 @@ void task_mem(struct seq_file *m, struct mm_struct *mm)
54 total_rss << (PAGE_SHIFT-10), 56 total_rss << (PAGE_SHIFT-10),
55 data << (PAGE_SHIFT-10), 57 data << (PAGE_SHIFT-10),
56 mm->stack_vm << (PAGE_SHIFT-10), text, lib, 58 mm->stack_vm << (PAGE_SHIFT-10), text, lib,
57 (PTRS_PER_PTE*sizeof(pte_t)*mm->nr_ptes) >> 10); 59 (PTRS_PER_PTE*sizeof(pte_t)*mm->nr_ptes) >> 10,
60 swap << (PAGE_SHIFT-10));
58} 61}
59 62
60unsigned long task_vsize(struct mm_struct *mm) 63unsigned long task_vsize(struct mm_struct *mm)