1. 23 May, 2017 2 commits
    • Brenden Blanco's avatar
      Merge pull request #1185 from gospo/master · 2631f6dc
      Brenden Blanco authored
      Add support for generic XDP mode
      2631f6dc
    • Andy Gospodarek's avatar
      Add support for generic XDP mode · 9f3cab70
      Andy Gospodarek authored
      Reused some of the code and command-line format from kernel XDP samples.
      
      $ sudo ./xdp_drop_count.py -S enp1s0
      Printing drops per IP protocol-number, hit CTRL+C to stop
      17: 36616 pkt/s
      17: 19720757 pkt/s
      17: 19685768 pkt/s
      17: 19643601 pkt/s
      17: 19694537 pkt/s
      [...]
      $ sudo ./xdp_drop_count.py enp1s0
      Printing drops per IP protocol-number, hit CTRL+C to stop
      17: 7029 pkt/s
      17: 29996706 pkt/s
      17: 30048705 pkt/s
      17: 30261417 pkt/s
      17: 30291967 pkt/s
      [...]
      
      Throughput difference is expected since generic XDP takes more
      instructions per packet than optimized XDP.
      
      v2: switch __u32 to uint32_t in bpf_attach_xdp
      Signed-off-by: default avatarAndy Gospodarek <gospo@broadcom.com>
      9f3cab70
  2. 22 May, 2017 3 commits
  3. 21 May, 2017 3 commits
  4. 20 May, 2017 9 commits
    • Teng Qin's avatar
      Unify perf event enums in Python API · f510b6b7
      Teng Qin authored
      f510b6b7
    • Teng Qin's avatar
      Unify perf_event type and config check · 9875221c
      Teng Qin authored
      9875221c
    • Brenden Blanco's avatar
      Merge pull request #1164 from palmtenor/symboloptions · cb3d1618
      Brenden Blanco authored
      Add ability for users to control symboling behavior
      cb3d1618
    • Teng Qin's avatar
      Do not pass type flag to symbol callback · cf130834
      Teng Qin authored
      As the symbol type check now controled by the specified
      `bcc_symbol_option` and handled in lower level, there is not need to
      pass the type flag to the callback anymore.
      cf130834
    • Teng Qin's avatar
      Use bcc_symbol_option in ProcSyms · 89d901c6
      Teng Qin authored
      This commit makes `ProcSyms` constructor takes a `bcc_symbol_option`,
      and pass it down to underlying calls to control symboling behavior.
      If `nullptr` is passed, `ProcSyms` will use default setting, which is
      to use debug file, verify debug file checksum, and only load function symbols.
      
      This commit also makes `bcc_symcache_new` take a `bcc_symbol_option`
      parameter and pass it to the underlying `ProcSyms` constructor.
      89d901c6
    • Teng Qin's avatar
      Use bcc_symbol_option in bcc_resolve_symname · aff6ce70
      Teng Qin authored
      This commit makes `bcc_resolve_symname` to take an `bcc_symbol_option`
      parameter, and pass it to underlying calls to control symboling behavior.
      When `NULL` is passed, it will fallback to default which is current
      behavior that uses debug file, verify debug file CRC, and check all
      types of symbols.
      
      This commit also removes the unneccesary intermediate
      `bcc_find_symbol_addr`.
      
      Added documentation for usage of the API, updated most call sites to use
      default with `NULL`, and fixed some memory leaks at call sites.
      aff6ce70
    • Teng Qin's avatar
      Fix bcc_resolve_symname memory leak on error · 36e7d545
      Teng Qin authored
      `bcc_resolve_symname` should free `sym->module` on error. Also remove
      unused `sym_search_t`
      36e7d545
    • Teng Qin's avatar
      Use bcc_symbol_option in bcc_foreach_function_symbol · fcb2ed8e
      Teng Qin authored
      This commit changes `bcc_foreach_symbol` to use the new `bcc_symbol_option` to
      control it only wants function symbols. Also renamed it to
      bcc_foreach_function_symbol and added comments for better information.
      
      This commit maintained current behavior of the function to prefer use
      debug file and check debug file CRC. We could add option to configure
      that behavior in the future if needed.
      fcb2ed8e
    • Teng Qin's avatar
      Add option to control bcc_elf_foreach_sym behavior · 0336a290
      Teng Qin authored
      This commit adds a `bcc_symbol_option` to configure various symboling
      behaviors. Currently added options for reading debug file, and what type
      of symbols are wanted.
      
      This commit also makes bcc_elf_foreach_sym take a `bcc_symbol_option`
      parameter and repect the specified configurations.
      0336a290
  5. 19 May, 2017 1 commit
  6. 18 May, 2017 7 commits
  7. 17 May, 2017 2 commits
  8. 16 May, 2017 1 commit
  9. 15 May, 2017 1 commit
    • Brenden Blanco's avatar
      Enable recursive scanf support for char[] as string · daee97e4
      Brenden Blanco authored
      When a bpf table contains i8[] in one of its keys/leaves, use "" to
      enclose the value, rather than [ %i %i %i ... ] format. This simplifies
      the code that is generated for cases such as #1154, and brings it back
      under ~200ms code generation, instead of >30s. This change of format is
      not particularly robust (it doesn't handle escaping the doublequote
      character itself), but it should make more sense for the common case,
      such as tracing files and pathnames.
      
      The test case included tests both the functionality of the format string
      handling as well as the compile time, since test_clang already has an
      implicit 10second timeout limit.
      
      Fixes: #1154
      Signed-off-by: default avatarBrenden Blanco <bblanco@gmail.com>
      daee97e4
  10. 12 May, 2017 1 commit
  11. 11 May, 2017 3 commits
  12. 10 May, 2017 7 commits