From 1808735fce8308df2f0665e7a3dff16de57ed3cb 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: Fri, 28 Feb 2020 00:00:00 +0000 Subject: [PATCH] 78ce2dabe18ef1d87dc435e5bc9369ce82e8d6d2 --- index.html | 58 ++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 50 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index 57a301b..2f75bd3 100644 --- a/index.html +++ b/index.html @@ -1857,7 +1857,8 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
  • 29.2.3.2. Benchmark Buildroot build baseline
  • 29.2.3.3. Benchmark gem5 build
  • @@ -17919,7 +17920,7 @@ root

    gem5 also has a complex Python interface which is also largely auto-generated, which greatly increases the maintenance complexity of the project: Embedding Python in another application.

    -

    This is done so that reconfiguring platforms can be done quickly without recompiling, and it is amazing when it works, but the maintenance costs are also very high.

    +

    This is done so that reconfiguring platforms can be done quickly without recompiling, and it is amazing when it works, but the maintenance costs are also very high. For example, pybind11 of several trivial param_ files accounted for 50% of the build time at one point: pybind11 accounts for 50% of gem5 build time.

    @@ -21134,7 +21135,7 @@ static EmbeddedPyBind embed_obj("BadDevice", module_init, "BasicPioDevice");
    -

    It has been found that this usage of pybind11 across hundreds of SimObject files accounted for 50% of the gem5 build time at one point: https://gem5.atlassian.net/browse/GEM5-366

    +

    It has been found that this usage of pybind11 across hundreds of SimObject files accounted for 50% of the gem5 build time at one point: pybind11 accounts for 50% of gem5 build time.

    To get a feeling of how SimObject objects are run, see: gem5 event queue AtomicSimpleCPU syscall emulation freestanding example analysis.

    @@ -23585,6 +23586,26 @@ echo 1 > /proc/sys/vm/overcommit_memory
    +
  • +

    Language madness

    +
    + +
    +
  • @@ -24401,6 +24422,9 @@ There are no non-locking atomic types or atomic primitives in POSIX: userland/libs/python_embed/pure_cpp.cpp: C version of the above, the main goal of this example is to show how to interface with C classes.

    +
    @@ -24424,6 +24448,9 @@ There are no non-locking atomic types or atomic primitives in POSIX:

    https://stackoverflow.com/questions/145270/calling-c-c-from-python/60374990#60374990

    +
    +

    pybind11 is amazingly easy to use. But it also makes your builds really slow: pybind11 accounts for 50% of gem5 build time.

    +
    @@ -33892,9 +33919,6 @@ xdg-open graph-size.pdf

    All benchmarks done on P51.

    -

    Sample results at gem5 2a9573f5942b5416fb0570cf5cb6cdecba733392: 10 to 12 minutes.

    -
    -

    Get results with:

    @@ -33904,10 +33928,28 @@ tail -n+1 ../linux-kernel-module-cheat-regression/*/gem5-bench-build-*.txt
    -

    Ubuntu 19.10, GCC 9.2.1, LKMC 7c6bb29bc89ec3f1056c0680c3f08bd64018a7bc, gem5 d7d9bc240615625141cd6feddbadd392457e49eb (18-02-2020), ./build --arch aarch64 --gem5-worktree master --no-cache: 19:33 TODO must investigate why it got so much worse.

    +

    Ubuntu 19.10, GCC 9.2.1, LKMC 7c6bb29bc89ec3f1056c0680c3f08bd64018a7bc, gem5 d7d9bc240615625141cd6feddbadd392457e49eb (2020-02-18), ./build --arch aarch64 --gem5-worktree master --no-cache: 19m 33s TODO must investigate why it got so much worse.

    +
    +
    +

    Same but gem5 d7d9bc240615625141cd6feddbadd392457e49eb (2018-06-17) hacked with -Wnoerror: 11m 37s. So there was a huge regression in the last two years! We have to find it out.

    +
    +
    +

    A profiling of the build has been done at: https://gem5.atlassian.net/browse/GEM5-277

    -
    29.2.3.3.1. Benchmark gem5 single file change rebuild time
    +
    29.2.3.3.1. pybind11 accounts for 50% of gem5 build time
    + +
    +

    Yes, pybind11 is slow to build.

    +
    + +
    +
    +
    29.2.3.3.2. Benchmark gem5 single file change rebuild time

    This is the critical development parameter, and is dominated by the link time of huge binaries.