Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: iovisor/bcc
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: brho/bcc
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on May 10, 2023

  1. libbpf-tools: use fentry in funclatency

    For tracing kernel functions, funclatency will attempt to use fentry and
    fallback to kprobes if that fails.  I left the option to force the use
    of kprobes if you'd like.
    
    Under load, fentry is more efficient:
    
    With kprobes:
    
    cpu:/tmp/b# ./funclatency -u -k bpf_spin_lock
    Tracing bpf_spin_lock.  Hit Ctrl-C to exit
    ^C
         usec                : count    distribution
             0 -> 1          : 565159   |****************************************|
             2 -> 3          : 216204   |***************                         |
             4 -> 7          : 306316   |*********************                   |
             8 -> 15         : 416990   |*****************************           |
            16 -> 31         : 415110   |*****************************           |
            32 -> 63         : 170298   |************                            |
            64 -> 127        : 29726    |**                                      |
           128 -> 255        : 427962   |******************************          |
           256 -> 511        : 233207   |****************                        |
           512 -> 1023       : 453      |                                        |
          1024 -> 2047       : 0        |                                        |
    Exiting trace of bpf_spin_lock
    
    With fentry:
    cpu:/tmp/b# ./funclatency -u bpf_spin_lock
    Tracing bpf_spin_lock.  Hit Ctrl-C to exit
    ^C
         usec                : count    distribution
             0 -> 1          : 6371351  |****************************************+|
             2 -> 3          : 1100093  |******                                  |
             4 -> 7          : 518197   |***                                     |
             8 -> 15         : 174881   |*                                       |
            16 -> 31         : 25022    |                                        |
            32 -> 63         : 1553     |                                        |
            64 -> 127        : 1312     |                                        |
           128 -> 255        : 2376     |                                        |
           256 -> 511        : 0        |                                        |
    Exiting trace of bpf_spin_lock
    
    Signed-off-by: Barret Rhoden <[email protected]>
    brho committed May 10, 2023
    Configuration menu
    Copy the full SHA
    16a2543 View commit details
    Browse the repository at this point in the history
Loading