diff --git a/JOURNAL.md b/JOURNAL.md index e7e8668..265cc2e 100644 --- a/JOURNAL.md +++ b/JOURNAL.md @@ -5140,3 +5140,12 @@ To trace which accesses are done to the PLIC, I can use the mmiotracer, which will hopefully record how we configure the PLIC and lead to a reproducer. CONFIG_MMIOTRACE=y + +## 2024-10-07 + +Let's move on to the SPEC CPU benchmarks. I compiled them again with the current +nixpkgs, but they are too large. I made a "mini" version with only the "speed" +and "integer" variants and removing a couple of large benchmarks. + +Still, the closure is gigantic, as they are collecting the environment during +the build phase and that makes the result depend on the build packages. diff --git a/pkgs/spec-cpu/mini.nix b/pkgs/spec-cpu/mini.nix index 251a210..8971a14 100644 --- a/pkgs/spec-cpu/mini.nix +++ b/pkgs/spec-cpu/mini.nix @@ -26,12 +26,25 @@ stdenv.mkDerivation rec { ]; dontConfigure = true; - dontBuild = true; - installPhase = '' - mkdir -p $out/benchspec/CPU + buildPhase = '' + pwd + mkdir -p benchspec/CPU for bench in $benchList; do - cp -a ${spec-cpu}/benchspec/CPU/$bench $out/benchspec/CPU/ + cp -r ${spec-cpu}/benchspec/CPU/$bench benchspec/CPU/ done + + # Make writable + chmod -R +w benchspec + + # Remove environment + find benchspec -name '*.cmd' | xargs sed -i '/^-E/d' + # Remove compare script as it refers to spec-cpu-tools + find benchspec -name 'compare.cmd' -delete + ''; + installPhase = '' + pwd + mkdir -p $out + cp -r benchspec/ $out mkdir -p $out/bin echo -e "#!$SHELL\necho $out" > $out/bin/spec-cpu-mini chmod +x $out/bin/spec-cpu-mini