On Mon, Feb 11, 2019 at 11:23:40PM +0300, Alexey Budankov wrote:
> 
> Compression is implemented using simple Zstd API and employs AIO data
> buffer as the memory to operate on. If the API call fails for some
> reason compression falls back to memcpy().
> 
> Data chunks are split and packed into PERF_RECORD_COMPRESSED records
> by 64KB at max. mmap-flush option value can be used to avoid compression
> of every single byte of data and increase compression ratio.
> 
> Signed-off-by: Alexey Budankov <alexey.budan...@linux.intel.com>
> ---
> Changes in v2:
> - enabled trace compression for serial trace streaming
> - moved compression/decompression code to session layer
> 
> ---
>  tools/perf/builtin-record.c |  67 +++++++++-----
>  tools/perf/util/mmap.c      | 173 +++++++++++++++++++++---------------
>  tools/perf/util/mmap.h      |  24 +++--
>  tools/perf/util/session.c   | 106 ++++++++++++++++++++++
>  tools/perf/util/session.h   |  13 +++
>  5 files changed, 280 insertions(+), 103 deletions(-)
> 
> diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> index 227dbbd47d3f..435ff88dfc5e 100644
> --- a/tools/perf/builtin-record.c
> +++ b/tools/perf/builtin-record.c
> @@ -112,8 +112,7 @@ static bool switch_output_time(struct record *rec)
>              trigger_is_ready(&switch_output_trigger);
>  }
>  
> -static int record__write(struct record *rec, struct perf_mmap *map 
> __maybe_unused,
> -                      void *bf, size_t size)
> +static int record__write(struct record *rec, void *bf, size_t size)

please keep the 'struct perf_mmap *map' in, I'm using it in
the multiple file storage, where each map holds pointer to
its data file

thanks,
jirka

Reply via email to