1. 12 Dec, 2017 1 commit
  2. 07 Dec, 2017 2 commits
  3. 05 Dec, 2017 1 commit
    • Yonghong Song's avatar
      provide padded structure for table_{key|leaf}_desc API · 538a84e1
      Yonghong Song authored
      This patch intends to fix issue #606.
      
      Currently, the key/value type information is passed from
      C++ to Python through a JSON interface. The JSON is
      constructed by traversing the struct/field's through clang
      AST interface. Once Python gets the JSON, it will
      reconstruct the C structure through ctype module.
      
      There are two known issues where Python reconstructed
      C structure may not be the same as the original C structure:
        . if user explicitly use "__attribute__ ((align))" to alter
          field alignment and such information is not passed to
          Python.
        . the "__int128" type is a u64[2] array in python.
          So in C, __int128 needs to align on 16 bytes boundary, and
          in Python, it aligns with 8 bytes boundary.
      
      To solve this issue, this patch provided the structure
      with added padding fields to Python. For example,
        struct {
          char a;
          __int128 b;
        };
      Python will receive
        struct {
          char a;
          char __pad_1[15];
          __int128 b;
        };
      Signed-off-by: default avatarYonghong Song <yhs@fb.com>
      538a84e1
  4. 04 Dec, 2017 2 commits
  5. 30 Nov, 2017 2 commits
  6. 29 Nov, 2017 3 commits
  7. 27 Nov, 2017 3 commits
  8. 25 Nov, 2017 1 commit
  9. 24 Nov, 2017 2 commits
    • yonghong-song's avatar
      Merge pull request #1456 from iamkafai/kafai_dev · 392267f4
      yonghong-song authored
      man/bps: Add a man page for introspection/bps.c
      392267f4
    • Olivier Tilmans's avatar
      python: make _decode_table_types aware of __int128 · a1962c6e
      Olivier Tilmans authored
      There are no ctypes types ready for int128. However, recognizing this
      type and representing it as an array is better than simply erroring out.
      
      * Add mapping between (unsigned) __128 C types declaration and ctypes
        parsing
      * Add simple test case in test_clang to recognisze and use such types
      * Fixes deprecation warnings about self.assertEquals in 2 other test
        cases.
      a1962c6e
  10. 23 Nov, 2017 1 commit
  11. 22 Nov, 2017 8 commits
  12. 21 Nov, 2017 5 commits
    • Ivan Babrou's avatar
      95c20b01
    • Olivier Tilmans's avatar
      Fix dns_matching example · 1af99d4e
      Olivier Tilmans authored
      * The name encoding function was not checking the constraints on domain
        names properly (<= 253 chars as one byte is needed for the name of the
        label and one for the terminating 0-len label; <= 63 chars per label).
      * The name encoding function was erroring when assigning a struct value
        in the byte array (Python 3.6.3). Refactored to join successive
        subarrays, and moved the null padding to make it explicit that it is
        needed by the bpf map key (and not the dns encoding).
      * Used builtin from argparse to have a list of domains in the command
        line arguments.
      * Reset the non-block flag through fcntl directly instead of
        reconstructing a socket object.
      * Exit gracefully when triggering SIGINT as hinted.
      1af99d4e
    • Lukasz Dorau's avatar
      Update info about Ubuntu Xenial in INSTALL.md · 61bc92ad
      Lukasz Dorau authored
      Update info about installing stable packages
      for Ubuntu Xenial in INSTALL.md
      
      Fixes:#1440
      61bc92ad
    • 4ast's avatar
      Merge pull request #1448 from palmtenor/hw_cache_events · dee8f8f0
      4ast authored
      Update perf event type and config checks
      dee8f8f0
    • Teng Qin's avatar
      Update perf event type and config checks · 01b07bae
      Teng Qin authored
      01b07bae
  13. 20 Nov, 2017 4 commits
    • yonghong-song's avatar
      Merge pull request #1447 from yadutaf/fix-solisten · 10f3f22c
      yonghong-song authored
      solisten.py maintenance
      10f3f22c
    • Sandipan Das's avatar
      Fix 'test_libbcc' from failing because of ruby · c15b5c87
      Sandipan Das authored
      This fixes 'test_usdt_probes', called from 'test_libbcc', from
      failing if the static markers are in libruby rather than a ruby
      executable. So, when the path of the binary having the markers
      is tested, we must check if either "/ruby" or "/libruby" is a
      substring rather than only checking for the former.
      
      Also, rather than relying on hardcoded values for the number of
      locations and arguments for a given probe, we capture this info
      using the readelf tool and then compare these with the values
      reported by bcc. This is because these numbers may vary across
      different versions of ruby and will cause the tests to fail.
      For example, 'test_libbcc' fails on Fedora 26 with ruby-2.4 as
      the number of locations where it expects 'array__create' is 7
      even when it is actually 2 as reported by bcc and verified with
      readelf output.
      Signed-off-by: default avatarSandipan Das <sandipan@linux.vnet.ibm.com>
      c15b5c87
    • Sandipan Das's avatar
      Fix 'test_libbcc' from failing due to symbol name mismatch · 5ac03dda
      Sandipan Das authored
      This fixes 'test_c_api', called from 'test_libbcc', from failing
      if the name of the first symbol with the address of "strtok" in
      libc as returned by bcc_symcache_resolve() is not "strtok" but
      some other alias pointing to the same address. For glibc-2.25 on
      powerpc, a mismatch occurs as the name of the first symbol with
      the same address as that of "strtok" is "__GI_strtok". This can
      be verified from the output of the nm tool on Fedora 26 ppc64le
      as shown below.
      
        00000000000b59c0 t __GI_strtok
        00000000000b59c0 T strtok
      Signed-off-by: default avatarSandipan Das <sandipan@linux.vnet.ibm.com>
      5ac03dda
    • Sandipan Das's avatar
      Add utility for cc tests to read command outputs · 2c4da18a
      Sandipan Das authored
      This introduces a separate source file for adding common
      utilities which can be used by any of the cc tests. For
      now, we add a function to read values from the output of
      a command with a format string like scanf().
      Signed-off-by: default avatarSandipan Das <sandipan@linux.vnet.ibm.com>
      2c4da18a
  14. 18 Nov, 2017 2 commits
  15. 17 Nov, 2017 3 commits