How to modify a file under src/python and run it w

2020-05-09 00:54发布

问题:

If you modify a file under src/python, then a rebuild is necessary, unlike modifications to configs/

That makes making changes under that directory very painful, since even the clean rebuild takes several seconds.

Is there a way to avoid the rebuild?

回答1:

M5_OVERRIDE_PY_SOURCE=true

If you export that environment variable for the run, and gem5 uses the Python source code directly.

This likely exists because by default, gem5 packs up Python object files inside the gem5.opt binary so allows users to run it without changing their PYTHON_PATH.

How M5_OVERRIDE_PY_SOURCE works is described here at 252dd80.

Tested on: https://gem5.googlesource.com/public/gem5/+/91295ff980c17efb3ad013b9636017b58e49c071



标签: gem5