From 0bc76fc58223dd672416ca956b56bcc8905675a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciro=20Santilli=20=E5=85=AD=E5=9B=9B=E4=BA=8B=E4=BB=B6=20?= =?UTF-8?q?=E6=B3=95=E8=BD=AE=E5=8A=9F?= Date: Wed, 22 Jan 2020 00:00:00 +0000 Subject: [PATCH] gem5: bring fast build back to life and benchmark it on busy loop --- README.adoc | 56 ++++++++++++++++++++++++++++++++++++++++------------- common.py | 5 ++++- 2 files changed, 47 insertions(+), 14 deletions(-) diff --git a/README.adoc b/README.adoc index 277d324..968b544 100644 --- a/README.adoc +++ b/README.adoc @@ -12155,6 +12155,18 @@ In order to use different build options, you might also want to use <> at LKMC a18f28e263c91362519ef55 |QEMU busy loop |a18f28e263c91362519ef550150b5c9d75fa3679 + 1 |link:userland/gcc/busy_loop.c[] `-O0` -|`qemu --arch aarch64 --userland userland/gcc/busy_loop.c ` +|`./run --arch aarch64 --userland userland/gcc/busy_loop.c ` |10^10 |68 |1.1 * 10^11 (approx) @@ -19756,25 +19768,43 @@ Summary of manually collected results on <> at LKMC a18f28e263c91362519ef55 |gem5 busy loop |a18f28e263c91362519ef550150b5c9d75fa3679 + 1 |link:userland/gcc/busy_loop.c[] `-O0` -|`gem5 --arch aarch64 --userland userland/gcc/busy_loop.c` -|10^7 -|100 -|1.10018162 * 10^8 -|1 +|`./run --arch aarch64 --emulator gem5 --static --userland userland/gcc/busy_loop.c --userland-args 1000000` +|10^6 +|18 +|2.4005699 * 10^7 +|1.3 |gem5 busy loop for a debug build |a18f28e263c91362519ef550150b5c9d75fa3679 + 1 |link:userland/gcc/busy_loop.c[] `-O0` -|`gem5 --arch aarch64 --gem5-build-id debug --userland userland/gcc/busy_loop.c --userland-args 100000` +|`./run --arch aarch64 --emulator gem5 --gem5-build-type debug --static --userland userland/gcc/busy_loop.c --userland-args 100000` |10^5 -|32 -|2.528728 * 10^6 -|0.08 +|33 +|2.405682 * 10^6 +|0.07 + +|gem5 busy loop for a fast build +|0d5a41a3f88fcd7ed40fc19474fe5aed0463663f + 1 +|link:userland/gcc/busy_loop.c[] `-O0 -static` +|`./run --arch aarch64 --emulator gem5 --gem5-build-type fast --static --userland userland/gcc/busy_loop.c --userland-args 1000000` +|10^6 +|15 +|2.4005699 * 10^7 +|1.6 + +|gem5 busy loop for a <> +|a18f28e263c91362519ef550150b5c9d75fa3679 + 1 +|link:userland/gcc/busy_loop.c[] `-O0` +|`+./run --arch aarch64 --emulator gem5 --arch aarch64 --static --userland userland/gcc/busy_loop.c --userland-args 1000000 -- --cpu-type TimingSimpleCPU --caches+` +|10^6 +|26 +|2.4005699 * 10^7 +|0.9 |gem5 busy loop for a <> |a18f28e263c91362519ef550150b5c9d75fa3679 + 1 |link:userland/gcc/busy_loop.c[] `-O0` -|`+gem5 --arch aarch64 --userland userland/gcc/busy_loop.c --userland-args 1000000 -- --cpu-type MinorCPU --caches+` +|`+./run --arch aarch64 --emulator gem5 --arch aarch64 --userland userland/gcc/busy_loop.c --userland-args 1000000 -- --cpu-type MinorCPU --caches+` |10^6 |31 |1.1018152 * 10^7 @@ -19783,7 +19813,7 @@ Summary of manually collected results on <> at LKMC a18f28e263c91362519ef55 |gem5 busy loop for a <> |a18f28e263c91362519ef550150b5c9d75fa3679 + 1 |link:userland/gcc/busy_loop.c[] `-O0` -|`+gem5 --arch aarch64 --userland userland/gcc/busy_loop.c --userland args 1000000 -- --cpu-type DerivO3CPU --caches+` +|`+./run --arch aarch64 --emulator gem5 --userland userland/gcc/busy_loop.c --userland args 1000000 -- --cpu-type DerivO3CPU --caches+` |10^6 |52 |1.1018128 * 10^7 @@ -19792,7 +19822,7 @@ Summary of manually collected results on <> at LKMC a18f28e263c91362519ef55 | |a18f28e263c91362519ef550150b5c9d75fa3679 + 1 |link:userland/gcc/busy_loop.c[] `-O0` -|`+gem5 --arch aarch64 --gem5-build-id MOESI_CMP_directory -- --cpu-type DerivO3CPU --caches --ruby+` +|`+./run --arch aarch64 --emulator gem5 --gem5-build-id MOESI_CMP_directory -- --cpu-type DerivO3CPU --caches --ruby+` |1 * 1000000 = 10^6 |63 |1.1005150 * 10^7 diff --git a/common.py b/common.py index 9b60b4d..359f377 100644 --- a/common.py +++ b/common.py @@ -150,6 +150,9 @@ consts['build_type_choices'] = [ # -O0 -g 'debug' ] +consts['gem5_build_type_choices'] = consts['build_type_choices'] + [ + 'fast', +] consts['build_type_default'] = 'opt' # Files whose basename start with this are gitignored. consts['tmp_prefix'] = 'tmp.' @@ -333,7 +336,7 @@ Default: {} ) self.add_argument( '--gem5-build-type', - choices=consts['build_type_choices'], + choices=consts['gem5_build_type_choices'], default=consts['build_type_default'], help='gem5 build type, most often used for "debug" builds.' )