• Brenden Blanco's avatar
    Enable recursive scanf support for char[] as string · daee97e4
    Brenden Blanco authored
    When a bpf table contains i8[] in one of its keys/leaves, use "" to
    enclose the value, rather than [ %i %i %i ... ] format. This simplifies
    the code that is generated for cases such as #1154, and brings it back
    under ~200ms code generation, instead of >30s. This change of format is
    not particularly robust (it doesn't handle escaping the doublequote
    character itself), but it should make more sense for the common case,
    such as tracing files and pathnames.
    
    The test case included tests both the functionality of the format string
    handling as well as the compile time, since test_clang already has an
    implicit 10second timeout limit.
    
    Fixes: #1154
    Signed-off-by: default avatarBrenden Blanco <bblanco@gmail.com>
    daee97e4
test_clang.py 14.6 KB