perf tools: Add compress.h for the *_decompress_to_file() headers
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: 611f0afee0e87eb6d184e7f58aa20d18d291d169 Gitweb: http://git.kernel.org/tip/611f0afee0e87eb6d184e7f58aa20d18d291d169 Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Wed, 19 Apr 2017 16:29:38 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Mon, 24 Apr 2017 12:33:33 -0300
perf tools: Add compress.h for the *_decompress_to_file() headers
Out of util.h, the implementations were already in separate files, that are built conditionally.
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/util/compress.h | 12 ++++++++++++ tools/perf/util/dso.c | 1 + tools/perf/util/lzma.c | 1 + tools/perf/util/util.h | 8 -------- tools/perf/util/zlib.c | 1 + 5 files changed, 15 insertions(+), 8 deletions(-)
tools/perf/util/compress.h new file +12 -0
@@ -0,0 +1,12 @@ +#ifndef PERF_COMPRESS_H +#define PERF_COMPRESS_H + +#ifdef HAVE_ZLIB_SUPPORT +int gzip_decompress_to_file (const char *input,int output_fd); +#endif + +#ifdef HAVE_LZMA_SUPPORT +int lzma_decompress_to_file (const char *input,int output_fd); +#endif + +#endif /* PERF_COMPRESS_H */
tools/perf/util/dso.c +1 -0
@@ -3,6 +3,7 @@#include <sys/time.h> #include <sys/resource.h> #include <errno.h> +#include "compress.h" #include "path.h" #include "symbol.h" #include "dso.h"
tools/perf/util/lzma.c +1 -0
@@ -2,6 +2,7 @@#include <lzma.h> #include <stdio.h> #include <linux/compiler.h> +#include "compress.h" #include "util.h" #include "debug.h"
tools/perf/util/util.h +0 -8
@@ -99,14 +99,6 @@ void mem_bswap_32(void *src, int byte_size);bool find_process (const char *name); -#ifdef HAVE_ZLIB_SUPPORT -int gzip_decompress_to_file (const char *input,int output_fd); -#endif - -#ifdef HAVE_LZMA_SUPPORT -int lzma_decompress_to_file (const char *input,int output_fd); -#endif -int get_stack_size (const char *str,unsigned long *_size); int fetch_kernel_version(unsigned int *puint,
tools/perf/util/zlib.c +1 -0
@@ -4,6 +4,7 @@#include <sys/mman.h> #include <zlib.h> +#include "util/compress.h" #include "util/util.h" #include "util/debug.h"