0

I am analyzing the memory accessing of a program on the ARM processor. Basically, I want to get 'instruction_address : R/W : memory_address' by tracing the instruction execution flow.

For Intel processors, pintool can do this by instruction instrumentation, and the perf can also do this by sampling (simply use 'perf mem' command).

Is there any similar way to trace the memory accesses on an ARMv8 architecture (the ARM-Linux is running on it)?

Claudio
  • 10,614
  • 4
  • 31
  • 71
Q. Guo
  • 13
  • 3

2 Answers2

0

You can just use perf for ARM.

Shachar Shemesh
  • 8,193
  • 6
  • 25
  • 57
  • 2
    Thanks for the reply. The 'perf mem' command requires HW support. This feature is implemented on the Intel processors since it requires Sandy Bridge and Ivy Bridge based processors. However, the perf for ARM seems not support the special kernel PMU events (i.e. mem-loads and mem-store) – Q. Guo Sep 25 '17 at 09:09
  • ARMv8 processors have their own PMU events. perf tool should work for ARM-Linux for Ubuntu/Redhat etc. – Zhifei Sep 26 '17 at 10:01
0

Alternatively have a look at the strace tool in Linux. It traces system calls and signals (including: network, file activity, memory calls). It is not dependent on the processor type, but it needs advanced knowledge to interpret those messages.

For instructions how to use it, this is a good thread.

Ardit
  • 1,522
  • 17
  • 23