1. 07 Jan, 2019 1 commit
  2. 04 Jan, 2019 6 commits
  3. 03 Jan, 2019 5 commits
  4. 02 Jan, 2019 13 commits
  5. 01 Jan, 2019 2 commits
  6. 31 Dec, 2018 4 commits
  7. 30 Dec, 2018 4 commits
  8. 29 Dec, 2018 1 commit
  9. 28 Dec, 2018 4 commits
    • Brendan Gregg's avatar
      Merge pull request #295 from iovisor/non_root · 9e608df7
      Brendan Gregg authored
      Better non-root error
      9e608df7
    • Brendan Gregg's avatar
      Merge pull request #297 from danobi/cmd_runner · e89957ff
      Brendan Gregg authored
      Add -c CMD option
      e89957ff
    • Daniel Xu's avatar
      Add -c CMD option · a3086a88
      Daniel Xu authored
      This patch adds a command running option to bpftrace. The user can now
      run something like:
      
          ./bpftrace -e '...' -c 'sleep 5'
      
      which is a convenience wrapper around something like:
      
          sleep 5 & ./bpfrace -e '...' -p `pidof sleep`
      
      `-c` is better because it:
      * ensures a tighter tracing range around CMD (ie we trace less of the
      system while it is not running CMD)
      * makes bpftrace exit (which is convenient) when CMD terminates
          * previously, it was not possible to get a full trace of CMDs
          execution and have bpftrace exit upon CMD termination
      
      Test Plan:
      Trivial successful example:
      ```
      $ sudo ./build/src/bpftrace -e 'tracepoint:syscalls:sys_enter_nanosleep
      { printf("%s nanoslept\n", comm); }' -c '/bin/sleep 1'
      [sudo] password for dlxu:
      chdir(/lib/modules/4.19.8-200.fc28.x86_64/build): No such file or
      directory
      Attaching 1 probe...
      sleep nanoslept
      splunkd nanoslept
      webrtc_audio_mo nanoslept
      gnome-terminal- nanoslept
      webrtc_audio_mo nanoslept
      gnome-terminal- nanoslept
      gnome-terminal- nanoslept
      gnome-terminal- nanoslept
      gnome-terminal- nanoslept
      gnome-terminal- nanoslept
      gnome-terminal- nanoslept
      gnome-terminal- nanoslept
      gnome-terminal- nanoslept
      gnome-terminal- nanoslept
      gnome-terminal- nanoslept
      
      $
      ```
      
      Ambigous executable:
      ```
      $ sudo ./build/src/bpftrace -e 'tracepoint:syscalls:sys_enter_nanosleep
      { printf("%s nanoslept\n", comm); }' -c 'sleep 1'
      chdir(/lib/modules/4.19.8-200.fc28.x86_64/build): No such file or
      directory
      Attaching 1 probe...
      execve: No such file or directory
      Failed to spawn child=sleep 1
      splunkd nanoslept
      
      $
      ```
      
      This closes #253
      a3086a88
    • williangaspar's avatar
      allow help to be printed · 22dc8d45
      williangaspar authored
      22dc8d45