Skip to content

Commit 94696ef

Browse files
committed
do not disable timer interrupt
1 parent 0a87e3e commit 94696ef

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

benchmarks/spec2006/build-all.nix

-10
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,6 @@ in stdenv.mkDerivation {
3737
riscv64-jemalloc
3838
];
3939

40-
prePatch = ''
41-
# Delete the test.t subtestcase in spec2006 400.perlbench using test input.
42-
# Details:
43-
# Due to the timer interrupt is disabled,
44-
# the testcase `sleep.t` in 400.perlbench's test input results in endless loop.
45-
# Related source code see:
46-
# * [profiling QEMU plugin](https://github.com/OpenXiangShan/qemu/blob/8758c375de12f09073614cad48f9956fe53b5aa7/contrib/plugins/profiling.c#L249)
47-
# * [before_workload](https://github.com/OpenXiangShan/riscv-rootfs/blob/03bdc9553ed9db132844b1e314485d465667eabd/apps/before_workload/before_workload.c#L15)
48-
sed -i '/sleep.t/d' ./spec2006/benchspec/CPU2006/400.perlbench/data/test/input/test.pl
49-
'';
5040
patches = [ ./483.xalancbmk.patch ];
5141

5242
configurePhase = let

builders/cptBuilder/qemu/default.nix

+4
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ stdenv.mkDerivation {
5252
patches = [
5353
./allow_get_icount_anytime.patch
5454
];
55+
# do not disable timer
56+
postPatch = ''
57+
sed -i 's/nemu_trap_count == 2/nemu_trap_count == 1/g' contrib/plugins/profiling.c
58+
'';
5559

5660
buildInputs = [
5761
python3

builders/imgBuilder/linux/initramfs/overlays/before_workload/default.nix

+5-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ stdenv.mkDerivation rec {
1414
riscv64-cc
1515
riscv64-libc
1616
];
17+
# do not disable timer interrupts, so that we can run multithread workloads.
18+
postPatch = ''
19+
sed '/DISABLE_TIME_INTR/d' ${src} > ${name}.c
20+
'';
1721
buildPhase = ''
18-
riscv64-unknown-linux-gnu-gcc ${src} -o ${name} -static
22+
riscv64-unknown-linux-gnu-gcc ${name}.c -o ${name} -static
1923
'';
2024
installPhase = ''
2125
mkdir -p $out/bin

0 commit comments

Comments
 (0)