Hello all,

I'm looking for a way to run multiple binaries (or multiple runs of the same 
binary) back to back in the same simulation session in syscall emulation mode 
on a single CPU / no SMT.

I had good success doing this in full system emulation - it's easy to write a 
custom script containing the desired binaries sandwiched between m5 
resetstats/dumpstats and m5 exit, for example:

```
#!/bin/bash
cd /some/path/
m5 resetstats
./binary args_1
./binary args_2
m5 dumpstats
m5 exit
```

However, looking at "examples/se.py" help and source, I see no obvious way of 
doing anything similar. I see that "-cmd" and "-options" parameters are split 
along ";", but any additional workloads after the first one seem to only be 
used in when multithreading is enabled or ncpus>1.

Here's a specific example on how I checked whether the above situation is 
supported:

test.c:
```
#include <stdio.h>
#include <stdlib.h>

int main( int argc, char *argv[] ){
    printf("Hello from SE! ");
    if (argc > 1){
        printf("DETECTED ARGUMENTS:\n");
        for(int idx = 1; idx < argc; idx++)
            printf("%d %s\n", idx, argv[idx]);
    }
    return 0;
}
```

Building:
aarch64-linux-gnu-gcc -o test_aarch64 test.c -static

Simulating:
../gem5/build/ARM/gem5.opt ../gem5/configs/example/se.py 
--cmd="test_aarch64;test_aarch64" --options="args_1;args_2"

Actual output:
**** REAL SIMULATION ****
<...>
Hello from SE! DETECTED ARGUMENTS:
1 args_1
Exiting @ tick 4545000 because exiting with last active thread context

Expected output:
**** REAL SIMULATION ****
<...>
Hello from SE! DETECTED ARGUMENTS:
1 args_1
Hello from SE! DETECTED ARGUMENTS:
1 args_2
Exiting @ tick 4545000 because exiting with last active thread context


Is there any other config script that does support such multiple binary 
simulation on a single CPU w/o multithreading? Have I missed some existing 
resources that already do this? Can someone confirm if this is at all possible 
in syscall emulation?

Thanks!
Norbert K.


_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to