Hi,

In my code, I am calling m5_switch_cpu to trigger cpu change. However, as
soon as it is called my simulation process goes to the S state, and is put
to sleep.

Here is my code:
#include <iostream>
#include "gem5/m5ops.h"
using namespace std;
int main()
{

    cout<<"Hi"<<endl;
    m5_switch_cpu();
    cout<<"Bye"<<endl;
    m5_exit(0);
    return 0;
}
And below is the ps a nad strace output
---ps a-----
PID TTY      STAT   TIME COMMAND
 2941 ttyS0    Ss     0:00 /bin/login -f
 2959 tty1     Ss     0:00 /bin/login -f
 3199 tty1     S+     0:00 -bash
 3251 ttyS0    S+     0:00 -bash
 3981 pts/0    Ss     0:00 -bash
 8488 pts/2    Ss     0:01 -bash
31779 pts/1    Ss     0:01 -bash
35156 pts/2    S+     0:00 sudo /home/cc/borrow//build/X86/gem5.opt -d test
/home/cc/borrow//configs/example/fs.py --caches --kernel
/home/cc/disks/binaries/vmlinux-5.4.49 --disk-image /home
35157 pts/2    Sl+    0:38 /home/cc/borrow//build/X86/gem5.opt -d test
/home/cc/borrow//configs/example/fs.py --caches --kernel
/home/cc/disks/binaries/vmlinux-5.4.49 --disk-image /home/cc/d
35164 pts/0    S+     0:00 telnet localhost 3456
35176 pts/1    R+     0:00 ps a
-------------------
Strace
cc@mm:~/disks/disks$ sudo strace -p 35157
strace: Process 35157 attached
futex(0x5648516cf894, FUTEX_WAIT_PRIVATE, 12, NULL^Cstrace: Process 35157
detached
 <detached ...>
_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org

Reply via email to