git submodule update --init submodules/dhrystone +./build-dhrystone --mode userland +./run --userland "$(./getvar userland_build_dir)/submodules/dhrystone/dhrystone"+
diff --git a/index.html b/index.html index 900574f..02a4511 100644 --- a/index.html +++ b/index.html @@ -1098,16 +1098,17 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
Let’s see if user mode runs considerably faster than full system or not.
First we build Dhrystone manually statically since dynamic linking is broken in gem5 as explained at: Section 10.6, “gem5 syscall emulation mode”.
+First we build Dhrystone manually statically since dynamic linking is broken in gem5 as explained at: Section 10.6, “gem5 syscall emulation mode”.
+TODO: move this section to our new custom dhrystone setup: Section 19.2.3.1, “Dhrystone”.
gem5 user mode:
@@ -17467,7 +17471,7 @@ rootOK, this is why we used gem5 in the first place, performance measurements!
Let’s see how many cycles Dhrystone, which Buildroot provides, takes for a few different input parameters.
+Let’s see how many cycles Dhrystone, which Buildroot provides, takes for a few different input parameters.
We will do that for various input parameters on full system by taking a checkpoint after the boot finishes a fast atomic CPU boot, and then we will restore in a more detailed mode and run the benchmark:
@@ -18150,7 +18154,69 @@ m5 dumpstatsThere are not yet enabled, but it should be easy to so, see: Section 20.5, “Add new Buildroot packages”
Created in the 80’s, it is not a representative measure of performance in modern computers anymore. It has mostly been replaced by SPEC, which is… closed source! Unbelievable.
+Buildroot has a dhrystone package, but because it is so interesting to us, we decided to also build it ourselves, which allows things like static and baremetal compilation more easily.
Build and run on QEMU User mode simulation:
+git submodule update --init submodules/dhrystone +./build-dhrystone --mode userland +./run --userland "$(./getvar userland_build_dir)/submodules/dhrystone/dhrystone"+
Build and run on gem5 use mode:
+./build-dhrystone --mode userland --static --force-rebuild +./run --emulator gem5 --userland "$(./getvar userland_build_dir)/submodules/dhrystone/dhrystone"+
TODO automate run more nicely.
+Build for Baremetal execution and run it in baremetal QEMU:
+./build-dhrystone --arch aarch64 --mode baremetal +./run --arch aarch64 --baremetal "$(./getvar baremetal_build_dir)/submodules/dhrystone/dhrystone"+
TODO: fix the build, just need to factor out all run arguments from build-baremetal into common.py and it should just work, no missing syscalls.
+If you really want the Buildroot package for some reason, build it with:
+./build-buildroot --config 'BR2_PACKAGE_DHRYSTONE=y'+
and run inside the guest from PATH with:
dhrystone+
The following benchmark setup works both:
Buildroot supports it, which makes everything just trivial:
Header only linear algebra library with a mainline Buildroot package:
We have ported parts of the PARSEC benchmark for cross compilation at: https://github.com/cirosantilli/parsec-benchmark See the documentation on that repo to find out which benchmarks have been ported. Some of the benchmarks were are segfaulting, they are documented in that repo.
./build --arch arm --download-dependencies gem5-buildroot parsec-benchmark @@ -18405,7 +18471,7 @@ cblas_dgemm( CblasColMajor, CblasNoTrans, CblasTrans,3,3,2 ,1, A,3, B,
Running a benchmark of a size different than test, e.g. simsmall, requires a rebuild with:
Most users won’t want to use this method because:
If you want to remove PARSEC later, Buildroot doesn’t provide an automated package removal mechanism as mentioned at: Section 20.6, “Remove Buildroot packages”, but the following procedure should be satisfactory:
If you end up going inside submodules/parsec-benchmark to hack up the benchmark (you will!), these tips will be helpful.
Also mentioned at: https://stackoverflow.com/questions/47320800/how-to-clean-only-target-in-buildroot
See this for a sample manual workaround: Section 19.2.3.4.4, “PARSEC uninstall”.
+See this for a sample manual workaround: Section 19.2.3.5.4, “PARSEC uninstall”.