0

Is there a tool that can trace/record a process's memory accesses throughout the execution? I found vmtrace suitable but it seems to be dead( at least the download link is not accessible).

Other information about memory access is also useful, such as page faults.

eightShirt
  • 1,457
  • 2
  • 15
  • 29
qweruiop
  • 3,156
  • 6
  • 31
  • 55
  • Can you please clarify what data you wish to collect? I'm assuming you don't want to record every single read or write access to every single byte of memory. So what exactly is it that you want to see? For example, do you just want to know which pages were ever read/written to (without any ordering)? – kaylum Mar 24 '15 at 03:48
  • @Alan Au Yes, basically I want to trace every single access (at byte granularity), in the order of process execution. – qweruiop Mar 24 '15 at 03:53
  • That's a pretty intense requirement. vmtrace doesn't seem to actually do that. It only records at the page level. So I don't think that would have helped you. Is there no way you can narrow down that requirement? I could be wrong but even if there were such a tool it would likely impractical to run as it would take a ridiculous amount of time to run even the simplest of programs whilst logging every single instruction and data read and write (every single instruction can have multiple memory accesses). – kaylum Mar 24 '15 at 04:04

1 Answers1

0

Without knowing your precise requirements I'm not sure if this will help you. But you can take a look at SystemTap. It's a powerful dynamic tracing framework. Essentially you write stap scripts that turn on/off tracepoints and does some processing each time a tracepoint is hit.

There are already many memory related stap scripts available. If none of them do what you want it's likely that you can write an stap script of your own to meet your exact requirements.

Here's a list of publicly available memory related stap scripts: https://sourceware.org/systemtap/examples/keyword-index.html#MEMORY

kaylum
  • 13,833
  • 2
  • 22
  • 31