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

libbpf-tools/profile: Add multi process/thread support #5012

Closed ekyooo closed 3 months ago

ekyooo commented 4 months ago

This is a test example.

  # ./profile -p 1292,15313
    Sampling at 49 Hertz of PID [1292, 15313] by user + kernel... Hit Ctrl-C to end.
        strlen
        -                test-strlen (15313)
            32

        strlen
        b
        a
        main
        __libc_start_main
        -                test-strlen-abc (1292)
            28

        strlen
        -                test-strlen (15313)
            18

        strlen
        b
        a
        main
        __libc_start_main
        -                test-strlen-abc (1292)
            17
yonghong-song commented 3 months ago

The concept looks good as perf also supports a list of pid/tid's. But there is a conflict with latest master branch. Also you should not have any change with src/cc/libbpf which is from upstream libbpf repo. Please rebase and resubmit.

ekyooo commented 3 months ago

The concept looks good as perf also supports a list of pid/tid's. But there is a conflict with latest master branch. Also you should not have any change with src/cc/libbpf which is from upstream libbpf repo. Please rebase and resubmit.

I'm sorry about this too. I cleaned up changes in src/cc/libbpf and rebased to latest master branch. Thank you.