summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Zhang <zhangjerry@google.com>2017-06-12 10:40:05 -0700
committerJerry Zhang <zhangjerry@google.com>2017-06-19 10:16:37 -0700
commit09df82b3faf33a9e3c602e1110ce79bf53a1926c (patch)
treeb632390a342c8a7d26f3a0e487f0b974f617ae5e
parent12b528a6eaf20bb5d614ea57209212caf61f3d7a (diff)
downloadkernel-09df82b3faf33a9e3c602e1110ce79bf53a1926c.tar.gz
Add optional module after caller address.
%pS will print the module name, if there is one, in brackets after printing the function info. Bug: 62367500 Test: 3.18, 4.4 Change-Id: I978b25fc2e27541f767fb790a120a25161d3bca8 (cherry picked from commit 52eb47b98551095690e17fda1a23efad8a30dbdd)
-rw-r--r--api/proc/ProcVmallocInfoTest.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/api/proc/ProcVmallocInfoTest.py b/api/proc/ProcVmallocInfoTest.py
index 83865f3a..72f12988 100644
--- a/api/proc/ProcVmallocInfoTest.py
+++ b/api/proc/ProcVmallocInfoTest.py
@@ -27,6 +27,7 @@ class ProcVmallocInfoTest(KernelProcFileTestBase.KernelProcFileTestBase):
t_PAGES = literal_token('pages')
t_IOREMAP = literal_token('ioremap')
+ t_MODULE = literal_token('\[[^\n^\0]*\]')
t_VMALLOC = literal_token('vmalloc')
t_VMAP = literal_token('vmap')
t_USER = literal_token('user')
@@ -42,7 +43,7 @@ class ProcVmallocInfoTest(KernelProcFileTestBase.KernelProcFileTestBase):
p_lines = repeat_rule('line')
def p_line(self, p):
- 'line : addr_range NUMBER caller pages phys ioremap vmalloc vmap user vpages NEWLINE'
+ 'line : addr_range NUMBER caller module pages phys ioremap vmalloc vmap user vpages NEWLINE'
p[0] = p[1:]
def p_addr_range(self, p):
@@ -54,6 +55,11 @@ class ProcVmallocInfoTest(KernelProcFileTestBase.KernelProcFileTestBase):
| empty'''
p[0] = p[1:]
+ def p_module(self, p):
+ '''module : MODULE
+ | empty'''
+ p[0] = p[1:]
+
def p_pages(self, p):
'''pages : PAGES EQUALS NUMBER
| empty'''