24.1. gem5 vs QEMU

  • advantages of gem5:

  • disadvantages of gem5:

    • slower than QEMU, see: Section 35.2.1, “Benchmark Linux kernel boot”

      This implies that the user base is much smaller, since no Android devs.

      Instead, we have only chip makers, who keep everything that really works closed, and researchers, who can’t version track or document code properly >:-) And this implies that:

      • the documentation is more scarce

      • it takes longer to support new hardware features

      Well, not that AOSP is that much better anyway.

    • not sure: gem5 has BSD license while QEMU has GPL

      This suits chip makers that want to distribute forks with secret IP to their customers.

      On the other hand, the chip makers tend to upstream less, and the project becomes more crappy in average :-)

    • gem5 is way more complex and harder to modify and maintain

      The only hairy thing in QEMU is the binary code generation.

      gem5 however has tended towards horrendous intensive code generation in order to support all its different hardware types

      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. 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.

      All of this also makes it hard to setup an IDE for developing gem5: gem5 Eclipse configuration

      The feelings of helplessness this brings are well summarized by the following CSDN article https://blog.csdn.net/maokelong95/article/details/85333905:

      Found DPRINTF based debugging unable to meet your needs?

      Found GDB based debugging unfriendly to human beings?

      Want to debug gem5 source with the help of modern IDEs like Eclipse?

      Failed in getting help from GEM5 community?

      Come on, dude! Here is the up-to-date tutorial for you!

      Just be ready for THE ENDLESS NIGHTMARE gem5 will bring!