• Sasha Goldshtein's avatar
    cc: Don't parse the same module multiple times for USDT probes · 69948a69
    Sasha Goldshtein authored
    If a module has more than one executable region, it is reported
    multiple times by `bcc_procutils_each_module`. This is fine for
    symbol resolution, but we don't need the duplicates for parsing
    the ELF header looking for USDT probes: the first appearance of
    that module is enough. This also prevents issues with the same
    probe appearing multiple times with the same location, which
    results in an invalid program when reading USDT arguments.
    
    Fix by storing each visited module in the USDT::Context class,
    and ignoring modules that were already visited.
    69948a69
usdt.h 6.35 KB