mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
/proc/PID/smaps: consistent whitespace output format
The keys in smaps output are padded to fixed width with spaces. All
except for THPeligible that uses tabs (only since commit c06306696f
("mm: thp: fix false negative of shmem vma's THP eligibility")).
Unify the output formatting to save time debugging some naïve parsers.
(Part of the unification is also aligning FilePmdMapped with others.)
Signed-off-by: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Yang Shi <yang.shi@linux.alibaba.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Matthew Wilcox <willy@infradead.org>
Link: http://lkml.kernel.org/r/20200728083207.17531-1-mkoutny@suse.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
4002570c5c
commit
471e78cc76
@ -786,7 +786,7 @@ static void __show_smap(struct seq_file *m, const struct mem_size_stats *mss,
|
||||
SEQ_PUT_DEC(" kB\nLazyFree: ", mss->lazyfree);
|
||||
SEQ_PUT_DEC(" kB\nAnonHugePages: ", mss->anonymous_thp);
|
||||
SEQ_PUT_DEC(" kB\nShmemPmdMapped: ", mss->shmem_thp);
|
||||
SEQ_PUT_DEC(" kB\nFilePmdMapped: ", mss->file_thp);
|
||||
SEQ_PUT_DEC(" kB\nFilePmdMapped: ", mss->file_thp);
|
||||
SEQ_PUT_DEC(" kB\nShared_Hugetlb: ", mss->shared_hugetlb);
|
||||
seq_put_decimal_ull_width(m, " kB\nPrivate_Hugetlb: ",
|
||||
mss->private_hugetlb >> 10, 7);
|
||||
@ -816,7 +816,7 @@ static int show_smap(struct seq_file *m, void *v)
|
||||
|
||||
__show_smap(m, &mss, false);
|
||||
|
||||
seq_printf(m, "THPeligible: %d\n",
|
||||
seq_printf(m, "THPeligible: %d\n",
|
||||
transparent_hugepage_enabled(vma));
|
||||
|
||||
if (arch_pkeys_enabled())
|
||||
|
Loading…
Reference in New Issue
Block a user