如何在src/python下修改文件并运行而不在gem5中重建? [英] How to modify a file under src/python and run it without rebuilding in gem5?

查看:60
本文介绍了如何在src/python下修改文件并运行而不在gem5中重建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您在src/python下修改文件,则必须进行重建,这与对configs/

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?

推荐答案

M5_OVERRIDE_PY_SOURCE=true

M5_OVERRIDE_PY_SOURCE=true

如果导出该环境变量以进行运行,并且gem5直接使用Python源代码.

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

这可能存在,因为默认情况下,gem5将Python目标文件打包在gem5.opt二进制文件内,因此允许用户在不更改其PYTHON_PATH的情况下运行它.

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.

M5_OVERRIDE_PY_SOURCE的工作方式此处在252dd80中进行了描述.

经过以下测试: https://gem5.googlesource.com/public/gem5/+/91295ff980c17efb3ad013b9636017b58e49c071

这篇关于如何在src/python下修改文件并运行而不在gem5中重建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆