首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >可以在Gem5系统调用模拟模式下运行Python代码吗?

可以在Gem5系统调用模拟模式下运行Python代码吗?
EN

Stack Overflow用户
提问于 2020-09-22 05:02:11
回答 1查看 486关注 0票数 1

我需要在Gem5中运行一些Python代码。作为测试,我创建了一个名为hello.py的Python程序,它打印"Hello World from Python“。我使用Pyinstaller创建了hello.py文件的二进制文件。二进制文件名为hello。接下来,我尝试使用以下命令./build/X86/gem5.opt --debug-flags=DRAM --debug-file=gem5-helloworld.out ./configs/example/se.py -c ./tests/test-progs/myFile/hello运行Gem5。但是,我收到以下消息,fatal: syscall fchmod (#91) unimplemented.和Gem5没有打印"Hello World from Python“。消息。如何解决上述问题?可以在Gem5中运行Python代码吗?Gem5在终端中打印以下内容。

代码语言:javascript
运行
复制
./build/X86/gem5.opt --debug-flags=DRAM --debug-file=gem5-helloworld.out ./configs/example/se.py -c ./tests/test-progs/myFile/hello

warn: CheckedInt already exists in allParams. This may be caused by the Python 2.7 compatibility layer.
warn: Enum already exists in allParams. This may be caused by the Python 2.7 compatibility layer.
warn: ScopedEnum already exists in allParams. This may be caused by the Python 2.7 compatibility layer.
gem5 Simulator System.  http://gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 version 20.0.0.3
gem5 compiled Aug  5 2020 12:06:57
gem5 started Sep 21 2020 16:31:18
gem5 executing on LAPWF05588, pid 248502
command line: ./build/X86/gem5.opt --debug-flags=DRAM --debug-file=gem5-helloworld.out ./configs/example/se.py -c ./tests/test-progs/myFile/hello

Global frequency set at 1000000000000 ticks per second
warn: No dot file generated. Please install pydot to generate the dot file and pdf.
warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (512 Mbytes)
0: system.remote_gdb: listening for remote gdb on port 7000
**** REAL SIMULATION ****
info: Entering event queue @ 0.  Starting simulation...
warn: ignoring syscall access(...)
info: Increasing stack size by one page.
warn: ignoring syscall mprotect(...)
warn: ignoring syscall mprotect(...)
warn: ignoring syscall mprotect(...)
warn: ignoring syscall mprotect(...)
warn: ignoring syscall mprotect(...)
warn: ignoring syscall mprotect(...)
info: Increasing stack size by one page.
info: Increasing stack size by one page.
info: Increasing stack size by one page.
info: Increasing stack size by one page.
info: Increasing stack size by one page.
info: Increasing stack size by one page.
info: Increasing stack size by one page.
warn: MOVNTDQ: Ignoring non-temporal hint, modeling as cacheable!
fatal: syscall fchmod (#91) unimplemented.
Memory Usage: 688628 KBytes
EN

回答 1

Stack Overflow用户

发布于 2020-09-22 05:53:51

您必须在命中时逐个实现所有缺少的必需syscall。

但是,它们中的一些不是基本的,它们将与未实现的存根一起工作,只需快速查看系统调用描述并尝试猜测它是否是基本的,例如https://github.com/gem5/gem5/blob/fa70478413e4650d0058cbfe81fd5ce362101994/src/arch/arm/linux/process.cc#L179

我想这不会太难。不尝试就不可能确定,这完全取决于丢失了多少不可忽略的syscall以及它们的实现有多复杂。

这种情况与Java类似:Running Java programs in gem5(or any language which is not C)

相关信息:

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63999944

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档