0

I am trying to simulate hardware changes such as cache on the application performance. However, what I want is arbitrary applications such as NodeJS, bash shell, java...

build/X86/gem5.opt \
configs/example/se.py \
--cmd /usr/bin/node \
--options /path/to/my/node.js

(1) Is this the correct way? Or do I have to feed an executable binary?

Using the command way, I got the error though:

fatal: syscall epoll_create1 (#291) unimplemented.

I found similar Q1 Q2

(2) If I did right in (1), how can I fix the errors. Maybe more than one unimplemented syscall. The Q2 answer says try gem5 full system model. I have little experience with gem5, so can you give me an example of using gem5 full system model to run a node, bash or whatever application that is not binary but command-line type?

yeehaw
  • 159
  • 2
  • 11
  • 1
    `/usr/bin/node` *is* an executable binary which reads a `.js` input file (and unlike `bash`, allocates some pages of executable memory to JIT into...). The problem is what other things that executable tries to do; apparently gem5 doesn't simulate all the system calls it wants to use. That might depend on what JavaScript code you try to run, or might be a total showstopper, IDK. – Peter Cordes Jun 03 '21 at 03:04
  • Thank you. Yes, I think the reason is my js code requires syscalls that gem5 does not support. I am not sure if it the correct to do so if we assume all the system calls are supported in gem5. So maybe I should try gem5 full system model simulation? But do i need to reinstall all the dependencies for the virtual full system? – yeehaw Jun 03 '21 at 03:09
  • 1
    If you ran a Linux kernel under its full-system emulation, then sure you could run whatever you wanted inside that virtual Linux system, and Gem5 wouldn't have to know or care exactly what system calls they made. – Peter Cordes Jun 03 '21 at 03:12

0 Answers0