Linux application profiling

前端 未结 6 2166
醉酒成梦
醉酒成梦 2020-12-12 17:40

I need some means of recording the performance of an application on a Linux machine. I won\'t have an IDE.

Ideally, I need an app that will attach to a process and l

6条回答
  •  佛祖请我去吃肉
    2020-12-12 17:56

    You can use valgrind. It records data in a file which you can analyse later using a proper gui like KCacheGrind

    A usage example would be :

    valgrind --tool=callgrind --dump-instr=yes --simulate-cache=yes your_program
    

    It'll generate a file called callgrind.out.xxx where xxx is the pid of the program

    edit: unlike gprof valgrind works with many different languages including java with some limitations.

提交回复
热议问题