Sniper-Arm cannot output simulation results

65 views
Skip to first unread message

Jingyao Zhang

unread,
Mar 7, 2023, 10:49:17 PM3/7/23
to Sniper simulator
Hi everyone,

I tried to use Sniper-Arm according to the documentation "README.arm64".
I encountered several problems, such as adding support for ARM in "simulator.cc" on X86 host.
  1. dl::dl_arch dla;
  2. String architecture = Sim()->getCfg()->getString("general/arch");
  3. if (architecture == "intel")
  4. dla = dl::DL_ARCH_INTEL;
  5. else if (architecture == "riscv")
  6. dla = dl::DL_ARCH_RISCV;
  7. else if (architecture == "armv8")
  8. dla = dl::DL_ARCH_ARMv8;
Another problem is on the frontend (arm board). I fixed it by setting the path as exact path in "dr-frontend/Cmakelist.txt".
Though I finally can successfully compile the Sniper in x86 host and dynamorio on Arm board, I still cannot get the simulation output.

Since I got everything done, I started compiled a hello.c on Arm board with the command "gcc -o hello hello.c", and then use the command in "README.arm64" to extract trace.
$(SIM_ROOT_ARM)/dynamorio/bin64/drrun -debug -loglevel 1 -c $(SIM_ROOT_ARM)/dynamorio/clients/lib64/debug/libdr-frontend.so -roi 0 -f 0 -d 0 -b 0 -o trace -e 0 -s 0 -r 0 -stop 0 -verbose -- hello

After getting the trace file, I transferred it to the x86 host and used the command to perform the simulation.
./run-sniper -v --traces=NAME_OF_TRACE.sift -ccortex-a72

However, there is no simulation result (sim.out). The output is as follows.
cloudyao@node0:~/yao/snipersim/z-test$ ../run-sniper -v --traces=ntt-trace.sift -c cortex-a72
  1. [SNIPER] (0) Using trace file /users/cloudyao/yao/snipersim/z-test/ntt-trace.sift
  2. [SNIPER] Start
  3. [SNIPER] Start
  4. [SNIPER] Running ['bash', '-c', '/users/cloudyao/yao/snipersim/lib/sniper -c /users/cloudyao/yao/snipersim/config/base.cfg --general/total_cores=1 --general/output_dir=/users/cloudyao/yao/snipersim/z-test -g --traceinput/mirror_output=true --config=/users/cloudyao/yao/snipersim/config/cortex-a72.cfg -g --traceinput/stop_with_first_app=true -g --traceinput/restart_apps=false -g --traceinput/enabled=true -g --traceinput/emulate_syscalls=false -g --traceinput/num_apps=1 -g --traceinput/thread_0=/users/cloudyao/yao/snipersim/z-test/ntt-trace.sift']
  5. [SNIPER] Running
  6. [SNIPER] Start
  7. [SNIPER] End
  8. [SNIPER] Elapsed time: 0.15 seconds
I am confused about where the mistakes are lying. 
Is my generation of the program wrong? Since I do not pass any flags to the hello.c.
Has anyone successfully run the process following the exact same steps in the README without encountering any problems?

Best regards,
Jingyao

Reply all
Reply to author
Forward
Message has been deleted
0 new messages