Link Search Menu Expand Document


Framework for Linux performance counter measurements. More information:

  • Display basic performance counter stats for a command:

perf stat {{gcc hello.c}}

  • Display system-wide real-time performance counter profile:

sudo perf top

  • Run a command and record its profile into

sudo perf record {{command}}

  • Record the profile of an existing process into

sudo perf record -p {{pid}}

  • Read (created by perf record) and display the profile:

sudo perf report