FastNetMon

Monday 25 August 2014

perf trace - эффективная замена strace в ряде случаев!

perf trace /bin/echo "Php suxx"
     0.000 ( 0.000 ms):  ... [continued]: read()) = 0
Problems reading syscall 59(execve) information
     0.288 ( 0.000 ms):  ... [continued]: execve()) = 0
Php suxx
     0.304 ( 0.001 ms): brk(brk: 0                                                            ) = 9400320
     0.320 ( 0.002 ms): mmap(addr: 0, len: 4096, prot: 3, flags: 34, fd: 4294967295, off: 0   ) = -1309794304
     0.329 ( 0.005 ms): access(filename: 140268025023360, mode: 4                             ) = -1 ENOENT No such file or directory
     0.337 ( 0.003 ms): open(filename: 140268025016833, flags: 0, mode: 1                     ) = 3
     0.340 ( 0.001 ms): fstat(fd: 3, statbuf: 140735595271856                                 ) = 0
     0.343 ( 0.003 ms): mmap(addr: 0, len: 32186, prot: 1, flags: 2, fd: 3, off: 0            ) = -1309827072
     0.345 ( 0.001 ms): close(fd: 3                                                           ) = 0
     0.355 ( 0.003 ms): open(filename: 140268027119178, flags: 0, mode: 0                     ) = 3
     0.357 ( 0.002 ms): read(fd: 3, buf: 140735595272280, count: 832                          ) = 832
     0.361 ( 0.001 ms): fstat(fd: 3, statbuf: 140735595271936                                 ) = 0
     0.366 ( 0.003 ms): mmap(addr: 0, len: 3750152, prot: 5, flags: 2050, fd: 3, off: 0       ) = -1315766272
     0.371 ( 0.004 ms): mprotect(start: 140268022771712, len: 2093056, prot: 0                ) = 0
     0.376 ( 0.004 ms): mmap(addr: 140268024864768, len: 20480, prot: 3, flags: 2066, fd: 3, off: 1613824) = -1312055296
     0.382 ( 0.003 ms): mmap(addr: 140268024885248, len: 18696, prot: 3, flags: 50, fd: 4294967295, off: 0) = -1312034816
     0.386 ( 0.001 ms): close(fd: 3                                                           ) = 0
     0.396 ( 0.002 ms): mmap(addr: 0, len: 4096, prot: 3, flags: 34, fd: 4294967295, off: 0   ) = -1309831168
     0.401 ( 0.002 ms): mmap(addr: 0, len: 4096, prot: 3, flags: 34, fd: 4294967295, off: 0   ) = -1309835264
     0.405 ( 0.001 ms): mmap(addr: 0, len: 4096, prot: 3, flags: 34, fd: 4294967295, off: 0   ) = -1309839360
     0.407 ( 0.001 ms): arch_prctl(option: 4098, arg2: 140268027086592, arg3: 140268027080704, arg4: 34, arg5: 4294967295) = 0
     0.459 ( 0.003 ms): mprotect(start: 140268024864768, len: 16384, prot: 1                  ) = 0
     0.467 ( 0.002 ms): mprotect(start: 140268027129856, len: 4096, prot: 1                   ) = 0
     0.472 ( 0.004 ms): munmap(addr: 140268027092992, len: 32186                              ) = 0
     0.531 ( 0.001 ms): brk(brk: 0                                                            ) = 9400320
     0.534 ( 0.002 ms): brk(brk: 9535488                                                      ) = 9535488
     0.545 ( 0.005 ms): open(filename: 140268022569584, flags: 0, mode: 140268024885264       ) = 3
     0.547 ( 0.001 ms): fstat(fd: 3, statbuf: 140268024885312                                 ) = 0
     0.552 ( 0.003 ms): mmap(addr: 0, len: 99158576, prot: 1, flags: 2, fd: 3, off: 0         ) = -1414926336
     0.555 ( 0.001 ms): close(fd: 3                                                           ) = 0
     0.577 ( 0.001 ms): fstat(fd: 1, statbuf: 140735595273776                                 ) = 0
     0.580 ( 0.002 ms): mmap(addr: 0, len: 4096, prot: 3, flags: 34, fd: 4294967295, off: 0   ) = -1309798400
     0.587 ( 0.004 ms): write(fd: 1, buf: 140268027121664, count: 9                           ) = 9
     0.592 ( 0.001 ms): close(fd: 1                                                           ) = 0
     0.596 ( 0.003 ms): munmap(addr: 140268027121664, len: 4096                               ) = 0
     0.599 ( 0.001 ms): close(fd: 2                                                           ) = 0
     0.602 ( 0.000 ms): exit_group(error_code: 0                                              

No comments :

Post a Comment

Note: only a member of this blog may post a comment.