• Alexey Budankov's avatar
    perf report: Implement perf.data record decompression · cb62c6f1
    Alexey Budankov authored
    zstd_init(, comp_level = 0) initializes decompression part of API only
    hat now consists of zstd_decompress_stream() function.
    
    The perf.data PERF_RECORD_COMPRESSED records are decompressed using
    zstd_decompress_stream() function into a linked list of mmaped memory
    regions of mmap_comp_len size (struct decomp).
    
    After decompression of one COMPRESSED record its content is iterated and
    fetched for usual processing. The mmaped memory regions with
    decompressed events are kept in the linked list till the tool process
    termination.
    
    When dumping raw records (e.g., perf report -D --header) file offsets of
    events from compressed records are printed as zero.
    
    Committer notes:
    
    Since now we have support for processing PERF_RECORD_COMPRESSED, we see
    none, in raw form, like we saw in the previous patch commiter notes,
    they were decompressed into the usual PERF_RECORD_{FORK,MMAP,COMM,etc}
    records, we only see the stats for those PERF_RECORD_COMPRESSED events,
    and sin...
    cb62c6f1
compress.h 1.83 KB