• Sasha Goldshtein's avatar
    funccount: Generalize for uprobes, tracepoints, and USDT · ff3b9f37
    Sasha Goldshtein authored
    This commit updates `funccount` to support attaching to a set of
    user functions, kernel tracepoints, or USDT probes using familiar
    syntax. Along the way, the implementation has been updated to use
    a separate BPF function for each target function, because using
    the instruction pointer to determine the function name doesn't
    work for anything other than kprobes. Even though the BPF program
    can now be potentially larger, testing with 40-50 attach points
    shows no significant overhead compared to the previous version.
    
    Examples of what's now possible:
    
    ```
    funccount t:block:*
    funccount u:node:gc*
    funccount -r 'c:(read|write)$'
    funccount -p 142 u:ruby:object__create
    ```
    ff3b9f37
funccount_example.txt 10.5 KB