]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
perf tools: Add compress.h for the *_decompress_to_file() headers
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 19 Apr 2017 19:29:38 +0000 (16:29 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 24 Apr 2017 15:33:33 +0000 (12:33 -0300)
Out of util.h, the implementations were already in separate files, that
are built conditionally.

Link: http://lkml.kernel.org/n/tip-0ur7szxsb59f8758kfe63prb@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/compress.h [new file with mode: 0644]
tools/perf/util/dso.c
tools/perf/util/lzma.c
tools/perf/util/util.h
tools/perf/util/zlib.c

diff --git a/tools/perf/util/compress.h b/tools/perf/util/compress.h
new file mode 100644 (file)
index 0000000..67fd1bb
--- /dev/null
@@ -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 */
index cbfe17f5168ab5ee7ea3837b9e2ac8a4f5529e30..3339ab7cabc51d7de8f1391e5ccf480d814044e3 100644 (file)
@@ -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"
index 5b73b268c1694cb982ad03e5281f0d97dc17113f..4ca7c5c6cdcd0a9e2aeeefad5cd08c9fe9020c8f 100644 (file)
@@ -2,6 +2,7 @@
 #include <lzma.h>
 #include <stdio.h>
 #include <linux/compiler.h>
+#include "compress.h"
 #include "util.h"
 #include "debug.h"
 
index 07c4293742e751f3e38f6417d15cb95bb326b74c..5dea8a96cf84cf51450ba0182bbed0476b1487d6 100644 (file)
@@ -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,
index 495a449fc25c35456c69f5e235fa8cbaff11d41c..1329d843eb7b4ef490517a8d631054151575106d 100644 (file)
@@ -4,6 +4,7 @@
 #include <sys/mman.h>
 #include <zlib.h>
 
+#include "util/compress.h"
 #include "util/util.h"
 #include "util/debug.h"