(1)查看某一进程所有的系统调用并输出到文件中
strace -o /home/output.txt -T -tt -e trace=all -p 进程id
(2)查看某个进程中最耗时的线程
步骤1: ps --efL | grep 进程名 | grep -v grep
步骤2: gdb attach 线程号
步骤3: bt
(3)查看某一进程cpu占用比较高的线程
1) top -H -p 进程id ----------查看耗时的线程
2) strace -o /home/output.txt -T -tt -e trace=all -p 线程id ------------查看线程的堆栈,定位耗时的代码位置,将输出结果写入/home/output.txt