1. 27 Mar, 2016 5 commits
    • Brendan Gregg's avatar
      Merge pull request #450 from vmg/vmg/stacks-next · c256e94d
      Brendan Gregg authored
      Stack Traces: TNG
      c256e94d
    • Vicent Marti's avatar
      stackcount: Resolve stacks using a StackTrace table · b4ebed0d
      Vicent Marti authored
      The changes for this script are minimal: the inline C probe has been
      _significantly_ simplified, and should now perform better since the
      stack walk happens in native code inside the kernel thanks to the
      BPF_STACK_TRACE table.
      
      The output of the tool should be virtually identical, so the man page
      and included examples have essentially no changes.
      b4ebed0d
    • Vicent Marti's avatar
      stacksnoop: Resolve stacks using a StackTrace table · 592414e0
      Vicent Marti authored
      Instead of manually walking the stack and printing each frame to the
      trace log, we can use a BPF_STACK_TRACE table to store the stack traces,
      and print to the trace log their IDs every time they are traced.
      
      The output of the tool has been slightly modified: we no longer prefix
      each line of the stack trace with the timestamp and the other headers,
      since the whole stack trace is fetched in one go from the table and the
      information would be highly redundant.
      
      The man page and the examples have been updated to reflect the new
      output.
      592414e0
    • Vicent Marti's avatar
      BPF: better format for `ksymaddr` · 3a137db2
      Vicent Marti authored
      The offset is now returned after a `+` symbol, instead of directly
      attached to the symbol name (which made reading the output very
      confusing)
      
      Before:
          tick_do_update_jiffies64a0
      
      After:
          tick_do_update_jiffies64+0xa0
      3a137db2
    • Brenden Blanco's avatar
      Merge pull request #448 from vmg/vmg/stacks · 478636be
      Brenden Blanco authored
      Better stack walking APIs
      478636be
  2. 26 Mar, 2016 2 commits
    • Vicent Marti's avatar
      offcputime: Resolve stacks using a StackTrace table · e82fb1ba
      Vicent Marti authored
      The manual walking for kernel stacks in the eBPF code has been replaced
      with a `BPF_STACK_TRACE` table; the stack ID is now stored as an integer
      in the main key.
      
      Thanks to the `StackTrace.walk` iterator, the printing code can also be
      significantly simplified for both folded and full stack modes.
      e82fb1ba
    • Vicent Marti's avatar
      memleak: Resolve stacks with a StackTrace table · e25ae03e
      Vicent Marti authored
      Instead of manually walking the (kernel) stack inside the eBPF code,
      create a `BPF_STACK_TRACE` table and store the stack IDs in the alloc
      info struct.
      
      This greatly simplifies the leak detection code: instead of storing the
      full stack trace as a string to de-duplicate the allocation point for
      the different allocations, we can store the `stack_id`. Since we're
      creating stack IDs with `BPF_F_REUSE_STACKID`, the kernel will take care
      of deduplication for us.
      
      Additionally, the `StackDecoder` class has been specialized into a
      `UStackDecoder` and `KStackDecoder` (for userland and kernel stacks,
      respectively). This lets us pass the decode class directly to
      `stack_traces.walk()` to automate symbol resolution.
      
      A new class, `Allocation` has been created to encapsulate what
      previously was a 2-element tuple of `(count, size)`. This
      e25ae03e
  3. 25 Mar, 2016 2 commits
    • Vicent Marti's avatar
      examples: Add `mallocstacks` · 88899060
      Vicent Marti authored
      This simple example script traces all calls to `malloc` in a process and
      prints the callsite using the new `BPF_STACK_TRACE` table API.
      88899060
    • Vicent Marti's avatar
      table: Implement a StackWalker for StackTrace tables · 066eb309
      Vicent Marti authored
      The StackWalker iterator lets us call `stack_trace.walk(id)` to iterate
      through the addresses in any given stack. The constructor of this
      iterator takes an optional `resolver` to convert the addresses in the
      iterator into symbols (or to format them according to the users' needs).
      066eb309
  4. 24 Mar, 2016 2 commits
  5. 23 Mar, 2016 2 commits
  6. 22 Mar, 2016 2 commits
  7. 21 Mar, 2016 8 commits
  8. 20 Mar, 2016 1 commit
  9. 16 Mar, 2016 2 commits
  10. 11 Mar, 2016 2 commits
  11. 10 Mar, 2016 1 commit
  12. 08 Mar, 2016 4 commits
  13. 04 Mar, 2016 7 commits