1. 08 Sep, 2017 4 commits
  2. 07 Sep, 2017 4 commits
    • 4ast's avatar
      Merge pull request #1336 from palmtenor/noinstance · 6aec3099
      4ast authored
      Do not create instance for kprobe
      6aec3099
    • Brendan Gregg's avatar
      Merge pull request #1333 from samuelnair/fix-py-tut · 08dbf13f
      Brendan Gregg authored
      Fix for bug in lesson 4 of the Python developer tutorial
      08dbf13f
    • Alexei Starovoitov's avatar
      annotate program tag · 4f47e3b5
      Alexei Starovoitov authored
      during debug of production systems it's difficult to trace back
      the kernel reported 'bpf_prog_4985bb0bd6c69631' symbols to the source code
      of the program, hence teach bcc to store the main function source
      in the /var/tmp/bcc/bpf_prog_4985bb0bd6c69631/ directory.
      
      This program tag is stable. Every time the script is called the tag
      will be the same unless source code of the program changes.
      During active development of bcc scripts the /var/tmp/bcc/ dir can
      get a bunch of stale tags. The users have to trim that dir manually.
      
      Python scripts can be modified to use this feature too, but probably
      need to be gated by the flag. For c++ api I think it makes sense
      to store the source code always, since the cost is minimal and
      c++ api is used by long running services.
      
      Example:
      $ ./examples/cpp/LLCStat
      $ ls -l /var/tmp/bcc/bpf_prog_4985bb0bd6c69631/
      total 16
      -rw-r--r--. 1 root root 226 Sep  1 17:30 on_cache_miss.c
      -rw-r--r--. 1 root root 487 Sep  1 17:30 on_cache_miss.rewritten.c
      -rw-r--r--. 1 root root 224 Sep  1 17:30 on_cache_ref.c
      -rw-r--r--. 1 root root 484 Sep  1 17:30 on_cache_ref.rewritten.c
      
      Note that there are two .c files there, since two different
      bpf programs have exactly the same bytecode hence same prog_tag.
      
      $ cat /var/tmp/bcc/bpf_prog_4985bb0bd6c69631/on_cache_miss.c
      int on_cache_miss(struct bpf_perf_event_data *ctx) {
          struct event_t key = {};
          get_key(&key);
      
          u64 zero = 0, *val;
          val = miss_count.lookup_or_init(&key, &zero);
      ...
      Signed-off-by: default avatarAlexei Starovoitov <ast@fb.com>
      4f47e3b5
    • Alexei Starovoitov's avatar
      add helpers to access program tag · b1df37c8
      Alexei Starovoitov authored
      bpf_obj_get_info() to retreive prog_tag from the kernel based on prog_fd (kernel 4.13+)
      bpf_prog_compute_tag() to compute prog_tag from a set of bpf_insns (kernel independent)
      bpf_prog_get_tag() to retrieve prog_tag from /proc/pid/fdinfo/fd (kernel 4.10+)
      Signed-off-by: default avatarAlexei Starovoitov <ast@fb.com>
      b1df37c8
  3. 05 Sep, 2017 4 commits
  4. 04 Sep, 2017 6 commits
  5. 03 Sep, 2017 1 commit
  6. 02 Sep, 2017 1 commit
  7. 30 Aug, 2017 1 commit
  8. 28 Aug, 2017 3 commits
  9. 26 Aug, 2017 1 commit
  10. 25 Aug, 2017 11 commits
  11. 24 Aug, 2017 2 commits
    • Brendan Gregg's avatar
      funccount: add -d for duration · b03d9eb2
      Brendan Gregg authored
      b03d9eb2
    • Yonghong Song's avatar
      fix lua-bcc build issue with cmake try_compile · 75e2f379
      Yonghong Song authored
      Certain versions of recent gcc (e.g., gcc 6.3.0 on ubuntu17.04)
      has pie enabled by default at linker (collect2) stage.
      The compilation flag "-no-pie" is available to negate
      this linker option.
      
      Add -no-pie to compilation flag only if it is available.
      Earlier gcc compiler may not have this option but it does
      not have linker pie on-by-default either.
      
      Tested with ubuntu 17.04 and my local gcc 4.8.5 (not accepting -no-pie).
      Signed-off-by: default avatarYonghong Song <yhs@fb.com>
      75e2f379
  12. 23 Aug, 2017 2 commits
    • Paul Chaignon's avatar
      Fix segfault on incomplete types · d32a61b0
      Paul Chaignon authored
      The bcc rewriter segfaults when it encounters an incomplete type
      (missing declaration or declaration after use) in a map declaration.
      This commit fixes it by first checking the type and returning an
      error if it is incomplete.
      d32a61b0
    • Paul Chaignon's avatar
      Test case for incomplete types · 574c3ebc
      Paul Chaignon authored
      The bcc rewriter segfaults when it encounters an incomplete type
      (missing declaration or declaration after use) in a map declaration.
      574c3ebc