File tree 3 files changed +9
-11
lines changed
imgBuilder/linux/initramfs/overlays/before_workload
3 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -37,16 +37,6 @@ in stdenv.mkDerivation {
37
37
riscv64-jemalloc
38
38
] ;
39
39
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
- '' ;
50
40
patches = [ ./483.xalancbmk.patch ] ;
51
41
52
42
configurePhase = let
Original file line number Diff line number Diff line change @@ -52,6 +52,10 @@ stdenv.mkDerivation {
52
52
patches = [
53
53
./allow_get_icount_anytime.patch
54
54
] ;
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
+ '' ;
55
59
56
60
buildInputs = [
57
61
python3
Original file line number Diff line number Diff line change @@ -14,8 +14,12 @@ stdenv.mkDerivation rec {
14
14
riscv64-cc
15
15
riscv64-libc
16
16
] ;
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
+ '' ;
17
21
buildPhase = ''
18
- riscv64-unknown-linux-gnu-gcc ${ src } -o ${ name } -static
22
+ riscv64-unknown-linux-gnu-gcc ${ name } .c -o ${ name } -static
19
23
'' ;
20
24
installPhase = ''
21
25
mkdir -p $out/bin
You can’t perform that action at this time.
0 commit comments