Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
xv6-public
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
问题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
银宸时代
OS Lab Group
奖励实验
xv6-public
提交
846a4116
提交
846a4116
5月 03, 2012
创建
作者:
Austin Clements
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Tweak filebench to start mtrace after setup
上级
cba5ff86
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
21 行增加
和
3 行删除
+21
-3
filebench.cc
bin/filebench.cc
+21
-3
没有找到文件。
bin/filebench.cc
浏览文件 @
846a4116
...
@@ -20,7 +20,10 @@
...
@@ -20,7 +20,10 @@
static
const
bool
pinit
=
true
;
static
const
bool
pinit
=
true
;
static
char
chunkbuf
[
CHUNKSZ
];
// XXX(austin) Totally lame. Align chunkbuf so that we don't have to
// COW fault on a mapped file page in bench.
static
char
chunkbuf
[
CHUNKSZ
]
__attribute__
((
aligned
(
4096
)));
static
void
static
void
bench
(
int
tid
,
int
nloop
,
const
char
*
path
)
bench
(
int
tid
,
int
nloop
,
const
char
*
path
)
...
@@ -83,16 +86,31 @@ main(int ac, char **av)
...
@@ -83,16 +86,31 @@ main(int ac, char **av)
}
}
close
(
fd
);
close
(
fd
);
mtenable
(
"xv6-filebench"
);
int
start
[
2
];
if
(
pipe
(
start
)
<
0
)
die
(
"pipe"
);
//mtenable("xv6-filebench");
u64
t0
=
rdtsc
();
u64
t0
=
rdtsc
();
for
(
int
i
=
0
;
i
<
nthread
;
i
++
)
{
for
(
int
i
=
0
;
i
<
nthread
;
i
++
)
{
int
pid
=
xfork
();
int
pid
=
xfork
();
if
(
pid
==
0
)
if
(
pid
==
0
)
{
close
(
start
[
1
]);
char
token
;
if
(
read
(
start
[
0
],
&
token
,
1
)
<
1
)
die
(
"read"
);
bench
(
i
,
nloop
,
path
);
bench
(
i
,
nloop
,
path
);
}
else
if
(
pid
<
0
)
else
if
(
pid
<
0
)
die
(
"fork"
);
die
(
"fork"
);
}
}
mtenable_type
(
mtrace_record_ascope
,
"xv6-filebench"
);
const
char
wakeup
[
256
]
=
{};
if
(
write
(
start
[
1
],
wakeup
,
nthread
)
<
nthread
)
die
(
"write"
);
for
(
int
i
=
0
;
i
<
nthread
;
i
++
)
for
(
int
i
=
0
;
i
<
nthread
;
i
++
)
xwait
();
xwait
();
u64
t1
=
rdtsc
();
u64
t1
=
rdtsc
();
...
...
编写
预览
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论