iovisor / bcc

BCC - Tools for BPF-based Linux IO analysis, networking, monitoring, and more
Apache License 2.0
20.36k stars 3.86k forks source link

Add support for bcachefs to fsdist and fsslower tools #4966

Closed tangyouling closed 4 months ago

tangyouling commented 5 months ago

Add support for bcachefs to fsdist and fsslower tools.

$ sudo ./bcachefsdist 
Tracing bcachefs operation latency... Hit Ctrl-C to end.
^C
operation = 'read'
     usecs               : count    distribution
         0 -> 1          : 1        |                                        |
         2 -> 3          : 0        |                                        |
         4 -> 7          : 0        |                                        |
         8 -> 15         : 2359     |****************************************|
        16 -> 31         : 453      |*******                                 |
        32 -> 63         : 42       |                                        |
        64 -> 127        : 1        |                                        |

operation = 'write'
     usecs               : count    distribution
         0 -> 1          : 0        |                                        |
         2 -> 3          : 0        |                                        |
         4 -> 7          : 0        |                                        |
         8 -> 15         : 0        |                                        |
        16 -> 31         : 2681     |****************************************|
        32 -> 63         : 89       |*                                       |
        64 -> 127        : 41       |                                        |
       128 -> 255        : 11       |                                        |
       256 -> 511        : 0        |                                        |
       512 -> 1023       : 0        |                                        |
      1024 -> 2047       : 0        |                                        |
      2048 -> 4095       : 0        |                                        |
      4096 -> 8191       : 1        |                                        |
      8192 -> 16383      : 11       |                                        |
     16384 -> 32767      : 4        |                                        |

operation = 'open'
     usecs               : count    distribution
         0 -> 1          : 3        |****************************************|
         2 -> 3          : 1        |*************                           |

operation = 'getattr'
     usecs               : count    distribution
         0 -> 1          : 26       |****************************************|
$ sudo ./bcachefsslower 
Tracing bcachefs operations slower than 10 ms... Hit Ctrl-C to end.
TIME     COMM             PID     T BYTES   OFF_KB   LAT(ms) FILENAME
11:07:15 cp               229441  W 131072  346112     10.02 vmlinux1
11:07:15 cp               229441  W 131072  347136     20.66 vmlinux1
yonghong-song commented 4 months ago

There is a conflict with latest master. Could you rebase and resubmit the patch on top of latest master?

tangyouling commented 4 months ago

There is a conflict with latest master. Could you rebase and resubmit the patch on top of latest master?

@yonghong-song The current PR was closed by my wrong operation. It has been modified based on the latest master branch, and the new PR is as follows: https://github.com/iovisor/bcc/pull/4989