1. 13 Apr, 2018 1 commit
    • Jazel Canseco's avatar
      filetop: probe vfs_read and vfs_write instead to fix inlining issue · 6d818b68
      Jazel Canseco authored
      Filetop was originally designed to probe __vfs_read and __vfs_write,
      which are called by vfs_read and vfs_write, respectively. However,
      __vfs_read and __vfs_write are at times inlined, leading to these
      particular functions never actually being called. Since these functions
      are never called, the probes are never hit, and so filetop ends up
      registering zero READs and WRITEs.
      
      This patch fixes the issue by attaching the probes to vfs_read and
      vfs_write instead, which are guaranteed to be called during file reads
      and writes.
      Signed-off-by: default avatarJazel Canseco <jcanseco@google.com>
      6d818b68
  2. 11 Apr, 2018 2 commits
  3. 10 Apr, 2018 4 commits
  4. 09 Apr, 2018 3 commits
    • yonghong-song's avatar
      Merge pull request #1670 from joelagnel/submit-fix-1628 · 5d23500a
      yonghong-song authored
      bcc/syms: Fix shared library symbol lookup
      5d23500a
    • Joel Fernandes's avatar
      bcc/syms: Fix shared library symbol lookup · 5a1106c6
      Joel Fernandes authored
      Shared library addresses needed to be mapped what the address is expected in the
      symbol table. The address offset of the running shared library may be different from
      the one in the SO binary file. So we have to map it correctly in order for symbol
      look up to work.
      
      Often the address and file offset are the same so it works, however in Android this
      is not the case a lot of times. Fix the issue by adjusting the offset with the
      file offset from the ELF.
      
      Test: stackcount 'sys_futex' -v
      
      Before patch:
        ffffff800814bc14 sys_futex
        775d8e0db0       syscall
        775e149fe8       [unknown]
        775e14a598       [unknown]
        775e16a9e4       android::Parcel::validateReadData(unsigned long) const
        775e05d738       android::Thread::_threadLoop(void*)
        775d942470       __pthread_start(void*)
        775d8e54f8       __start_thread
          Binder:13353_5 [13353]
      
      After patch:
        ffffff800814bc14 sys_futex
        78ba2e1db0       syscall
        78b97d4fe8       android::IPCThreadState::getAndExecuteCommand()
        78b97d5598       android::IPCThreadState::joinThreadPool(bool)
        78b97f59e4       [unknown]
        78b8dda738       android::Thread::_threadLoop(void*)
        78ba4ffbd0       android::AndroidRuntime::javaThreadShell(void*)
        78ba343470       __pthread_start(void*)
        78ba2e64f8       __start_thread
          Binder:14001_8 [14001]
      
      Matches Perf output:
              ffffff800814bc14 sys_futex ([kernel.kallsyms])
                         1edb0 syscall (/system/lib64/libc.so)
                         45fe8 android::IPCThreadState::getAndExecuteCommand (/system/lib64/libbinder.so)
                         46598 android::IPCThreadState::joinThreadPool (/system/lib64/libbinder.so)
                         669e4 [unknown] (/system/lib64/libbinder.so)
                         10738 android::Thread::_threadLoop (/system/lib64/libutils.so)
                         7ebd0 android::AndroidRuntime::javaThreadShell (/system/lib64/libandroid_runtime.so)
                         80470 __pthread_start (/system/lib64/libc.so)
                         234f8 __start_thread (/system/lib64/libc.so)
      
      Fixes: https://github.com/iovisor/bcc/issues/1628Signed-off-by: default avatarJoel Fernandes <joelaf@google.com>
      Signed-off-by: default avatarJoel Fernandes <joel@linuxinternals.org>
      5a1106c6
    • yonghong-song's avatar
      Merge pull request #1672 from brtmr/master · cbb16114
      yonghong-song authored
      Added -q option to execsnoop to quote individual arguments. 
      cbb16114
  5. 08 Apr, 2018 3 commits
  6. 06 Apr, 2018 2 commits
    • 4ast's avatar
      Merge pull request #1669 from iovisor/yhs_dev · 18d3814c
      4ast authored
      fix compiler warning
      18d3814c
    • Yonghong Song's avatar
      fix compiler warning · 61130a16
      Yonghong Song authored
      The patch fixed the following compiler warnings:
      
        /home/yhs/work/bcc/src/cc/perf_reader.c: In function ‘read_data_head’:
        /home/yhs/work/bcc/src/cc/perf_reader.c:149:3: warning: dereferencing type-punned pointer will break strict-alias
        ing rules [-Wstrict-aliasing]
           uint64_t data_head = *((volatile uint64_t *)&perf_header->data_head);
           ^
        /home/yhs/work/bcc/src/cc/perf_reader.c: In function ‘read_data_head’:
        /home/yhs/work/bcc/src/cc/perf_reader.c:149:3: warning: dereferencing type-punned pointer will break strict-alias
        ing rules [-Wstrict-aliasing]
           uint64_t data_head = *((volatile uint64_t *)&perf_header->data_head);
           ^
      
      Declaring perf_header as volatile type will force its member read from memory,
      hence avoiding a forced type conversion.
      Signed-off-by: default avatarYonghong Song <yhs@fb.com>
      61130a16
  7. 05 Apr, 2018 3 commits
  8. 04 Apr, 2018 1 commit
  9. 03 Apr, 2018 7 commits
  10. 02 Apr, 2018 6 commits
  11. 29 Mar, 2018 2 commits
    • yonghong-song's avatar
      Merge pull request #1657 from fser/patch-1 · 41134b10
      yonghong-song authored
      Update INSTALL.md
      41134b10
    • @aifsair's avatar
      Update INSTALL.md · 37468faf
      @aifsair authored
      Add `libfl-dev` to the dependencies on debian to prevent the following error:
      ```
      [ 16%] Building CXX object src/cc/frontends/b/CMakeFiles/b_frontend.dir/loader.cc.o
      In file included from /root/bcc/src/cc/frontends/b/parser.h:21:0,
                       from /root/bcc/src/cc/frontends/b/loader.cc:17:
      /root/bcc/src/cc/frontends/b/lexer.h:22:23: fatal error: FlexLexer.h: No such file or directory
       #include <FlexLexer.h>
                             ^
      compilation terminated.
      ```
      37468faf
  12. 27 Mar, 2018 1 commit
  13. 26 Mar, 2018 4 commits
  14. 23 Mar, 2018 1 commit