def group_record(record):
default = None
for i in range(len(record.stack) - 1, -1, -1):
match = re.match(r'.+\/(.+\.(so|apk|oat))', record.stack[i].path, re.M | re.I)
if not match or match.group(1) == 'libraphael.so':
continue
elif record.stack[i].path.startswith('/data/'):
return match.group(1)
elif match.group(1) in system_group and not default:
default = match.group(1)
return default if default else 'extras'
部分场景raphael.py聚合的不准
比如
根据 group_record聚合函数,从栈底到栈顶遍历,只要是先找到了/data/下的so就返回,这种场景返回的是libmyb.so,实际应该返回libmya.so