+filters
This commit is contained in:
parent
992d59721a
commit
d33d8207f0
13
srcxray.py
13
srcxray.py
|
@ -19,7 +19,8 @@ import subprocess
|
||||||
import re
|
import re
|
||||||
|
|
||||||
black_list = ['aligned', '__attribute__', 'unlikely', 'typeof', 'u32',
|
black_list = ['aligned', '__attribute__', 'unlikely', 'typeof', 'u32',
|
||||||
'PVOP_CALLEE0', 'PVOP_VCALLEE0', 'PVOP_VCALLEE1', 'trace_hardirqs_off']
|
'PVOP_CALLEE0', 'PVOP_VCALLEE0', 'PVOP_VCALLEE1', 'if',
|
||||||
|
'trace_hardirqs_off']
|
||||||
|
|
||||||
level_limit = 7
|
level_limit = 7
|
||||||
limit = 10000
|
limit = 10000
|
||||||
|
@ -79,8 +80,14 @@ def func_referers_git_grep(name):
|
||||||
# Filter out names in comment afer function,
|
# Filter out names in comment afer function,
|
||||||
# when comment start from ' *'
|
# when comment start from ' *'
|
||||||
# To see the problem try "git grep -p and"
|
# To see the problem try "git grep -p and"
|
||||||
if re.match(r'.*: \* ', line):
|
for p in {
|
||||||
r = None
|
r'.*: \* .*%s',
|
||||||
|
r'.*/\*.*%s',
|
||||||
|
r'.*//.*%s',
|
||||||
|
r'.*".*\b%s\b.*"'}:
|
||||||
|
if re.match(p % (name), line):
|
||||||
|
r = None
|
||||||
|
break
|
||||||
if r and r != name and r not in black_list:
|
if r and r != name and r not in black_list:
|
||||||
res.append(r)
|
res.append(r)
|
||||||
r = None
|
r = None
|
||||||
|
|
Loading…
Reference in New Issue