Ahmad Siavashi
Ahmad Siavashi

Reputation: 999

Performance Trace of Program

I have a short-running program and once I run it, I need to record its CPU utilization and at the end I need to know its total instruction count. I went through some perf tools available for Linux but they did not satisfy my need. Is there a straightforward way to do this?

Upvotes: 2

Views: 71

Answers (1)

Ahmad Siavashi
Ahmad Siavashi

Reputation: 999

It turned out that perf was suitable for my need. As I was running the code in a VM, the vCPU had no performance counters; hence perf was showing me the not supported as value for the pertinent field. Running the program directly on the machine solved the issue.

Upvotes: 1

Related Questions