• Brenden Blanco's avatar
    Add BPF_HISTOGRAM type and print support · f0b15c49
    Brenden Blanco authored
    This adds support for a specialized histogram type, which underneath
    maps to an array or a hash table, depending on key type. With no
    arguments, it takes on the type `u64 table[64];`. The other current
    supported key type is `struct { int32|int64 bucket; int32|int64 slot }`.
    
    To print these automatically, print_log2_hist is underneath split into
    two types of printouts, one which prints the single histogram, and
    another which prints a histogram for each unique `bucket` value.
    
    See test_histogram.py for examples.
    
    Fixes: #144
    Signed-off-by: default avatarBrenden Blanco <bblanco@plumgrid.com>
    f0b15c49
b_frontend_action.cc 22.9 KB