[gem5-users] Re: does gem5 have a C++ API?

2021-07-02 Thread Konstantin Serebryany via gem5-users
On Fri, Jul 2, 2021 at 3:47 PM Jason Lowe-Power wrote: > Hello, > > Unfortunately, I don't think gem5 is the right tool for this job. When you > run that command, gem5's embedded python interpreter is executing `se.py`. > There's not really a way to easily get around this. You could try to >

[gem5-users] Re: does gem5 have a C++ API?

2021-07-02 Thread Jason Lowe-Power via gem5-users
Hello, Unfortunately, I don't think gem5 is the right tool for this job. When you run that command, gem5's embedded python interpreter is executing `se.py`. There's not really a way to easily get around this. You could try to compile gem5 without python (--without-python, IIRC), but then

[gem5-users] Re: does gem5 have a C++ API?

2021-07-01 Thread Konstantin Serebryany via gem5-users
Hi Jason, Thanks for the reply! I was hoping for something light-weight, similar to Unicorn, but based on gem5 instead of QEMU... I tried running build/X86/gem5.opt configs/example/se.py -c ./tests/test-progs/hello/bin/x86/linux/hello and it takes 0.3 second -- too slow. The profile shows:

[gem5-users] Re: does gem5 have a C++ API?

2021-07-01 Thread Jason Lowe-Power via gem5-users
Hello, It's somewhat possible. You can compile gem5 as a library (e.g., scons build//libgem5-opt.so). However, gem5 *is a python interpreter* and is configured via python scripts. Getting that to work with an external program is "exciting". It's possible to get python working, and there are other