Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

btf: reduce unnecessary copies when parsing BTF #623

Merged
merged 1 commit into from Apr 13, 2022

Commits on Apr 10, 2022

  1. btf: reduce unnecessary copies when parsing BTF

    We currently read all BTF into memory before starting decoding. This is wasteful,
    especially for the large-ish string table. Be a bit more clever to remove intermediate
    copies.
    
        name            old time/op    new time/op    delta
        ParseVmlinux-4     107ms ± 7%      77ms ±13%  -27.98%  (p=0.029 n=4+4)
    
        name            old alloc/op   new alloc/op   delta
        ParseVmlinux-4     119MB ± 0%      93MB ± 0%  -22.20%  (p=0.029 n=4+4)
    
        name            old allocs/op  new allocs/op  delta
        ParseVmlinux-4      786k ± 0%      786k ± 0%   -0.01%  (p=0.029 n=4+4)
    lmb committed Apr 10, 2022
    Configuration menu
    Copy the full SHA
    b343a09 View commit details
    Browse the repository at this point in the history