0

I have created a function in C which trace system calls.

This function calls the "perf" tracer.

The function is executing the command "perf trace -p pid" using "popen".

I have to measure the resource consumption of the C program using "top" linux command. However, my question is: Does the output shown by "top" also contains the resource consumption of "perf tracer"?

CrazyChucky
  • 3,263
  • 4
  • 11
  • 25

1 Answers1

0

Short answer is yes.

Both ps and top calculate consumption directly. You should even be able to track perf tracer's individual consumption using top. Hope this helps :)