1 Star 1 Fork 0

ArchShineZ/gem5_data_proc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
analyze 1.65 KB
一键复制 编辑 原始数据 按行查看 历史
ArchShineZ 提交于 2021-02-28 11:33 . Track all...
#!/usr/bin/env python3
import re
import argparse
from paths import *
from utils import common as c
from utils.target_stats import *
parser = argparse.ArgumentParser(description='check sum of slots',
prefix_chars='-')
parser.add_argument('-s', '--stats', default='./stats.txt',
help='stats.txt to be converted')
parser.add_argument('-n', '--num-insts',
default=0, type=int,
help='inst number to be searched')
parser.add_argument('-b', '--brief', action='store_true',
help='brief information')
parser.add_argument('-d', '--breakdown-targets', action='store_true',
help='breakdown information')
parser.add_argument('--branch', action='store_true',
help='branch prediction information')
parser.add_argument('--cache', action='store_true',
help='cache miss information')
opt = parser.parse_args()
curdir = os.getcwd()
# make_st_stat_cache()
max_insts = 200*10**6
if opt.num_insts:
num_insts = opt.num_insts
else:
num_insts = max_insts
m = re.search('(\w+)_(\w+)$', curdir)
if m:
hpt = m.group(1)
lpt = m.group(2)
else:
hpt = re.search('(\w+)$', curdir).group(1)
lpt = None
if opt.cache:
standard_targets += cache_targets
if opt.branch:
standard_targets += branch_targets
used_target = standard_targets
if opt.brief:
used_target = brief_targets
elif opt.breakdown_targets:
used_target = slot_targets
d = c.get_stats(opt.stats, used_target, num_insts, re_targets=True)
if used_target == standard_targets:
if opt.branch:
c.add_branch_mispred(d)
c.print_dict(d)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/ArchShineZ/gem5_data_proc.git
git@gitee.com:ArchShineZ/gem5_data_proc.git
ArchShineZ
gem5_data_proc
gem5_data_proc
graphmaker

搜索帮助

0d507c66 1850385 C8b1a773 1850385