diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-04-19 15:29:38 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-04-24 11:33:33 -0400 |
commit | 611f0afee0e87eb6d184e7f58aa20d18d291d169 (patch) | |
tree | 1620bba312a06f773baa76574f6a243897380e98 /tools | |
parent | 166ebdd2442660e7f942d657fc5e629000e58ec3 (diff) |
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.
Link: http://lkml.kernel.org/n/tip-0ur7szxsb59f8758kfe63prb@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/compress.h | 12 | ||||
-rw-r--r-- | tools/perf/util/dso.c | 1 | ||||
-rw-r--r-- | tools/perf/util/lzma.c | 1 | ||||
-rw-r--r-- | tools/perf/util/util.h | 8 | ||||
-rw-r--r-- | tools/perf/util/zlib.c | 1 |
5 files changed, 15 insertions, 8 deletions
diff --git a/tools/perf/util/compress.h b/tools/perf/util/compress.h new file mode 100644 index 000000000000..67fd1bb7c2b7 --- /dev/null +++ b/tools/perf/util/compress.h | |||
@@ -0,0 +1,12 @@ | |||
1 | #ifndef PERF_COMPRESS_H | ||
2 | #define PERF_COMPRESS_H | ||
3 | |||
4 | #ifdef HAVE_ZLIB_SUPPORT | ||
5 | int gzip_decompress_to_file(const char *input, int output_fd); | ||
6 | #endif | ||
7 | |||
8 | #ifdef HAVE_LZMA_SUPPORT | ||
9 | int lzma_decompress_to_file(const char *input, int output_fd); | ||
10 | #endif | ||
11 | |||
12 | #endif /* PERF_COMPRESS_H */ | ||
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c index cbfe17f5168a..3339ab7cabc5 100644 --- a/tools/perf/util/dso.c +++ b/tools/perf/util/dso.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <sys/time.h> | 3 | #include <sys/time.h> |
4 | #include <sys/resource.h> | 4 | #include <sys/resource.h> |
5 | #include <errno.h> | 5 | #include <errno.h> |
6 | #include "compress.h" | ||
6 | #include "path.h" | 7 | #include "path.h" |
7 | #include "symbol.h" | 8 | #include "symbol.h" |
8 | #include "dso.h" | 9 | #include "dso.h" |
diff --git a/tools/perf/util/lzma.c b/tools/perf/util/lzma.c index 5b73b268c169..4ca7c5c6cdcd 100644 --- a/tools/perf/util/lzma.c +++ b/tools/perf/util/lzma.c | |||
@@ -2,6 +2,7 @@ | |||
2 | #include <lzma.h> | 2 | #include <lzma.h> |
3 | #include <stdio.h> | 3 | #include <stdio.h> |
4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
5 | #include "compress.h" | ||
5 | #include "util.h" | 6 | #include "util.h" |
6 | #include "debug.h" | 7 | #include "debug.h" |
7 | 8 | ||
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h index 07c4293742e7..5dea8a96cf84 100644 --- a/tools/perf/util/util.h +++ b/tools/perf/util/util.h | |||
@@ -99,14 +99,6 @@ void mem_bswap_32(void *src, int byte_size); | |||
99 | 99 | ||
100 | bool find_process(const char *name); | 100 | bool find_process(const char *name); |
101 | 101 | ||
102 | #ifdef HAVE_ZLIB_SUPPORT | ||
103 | int gzip_decompress_to_file(const char *input, int output_fd); | ||
104 | #endif | ||
105 | |||
106 | #ifdef HAVE_LZMA_SUPPORT | ||
107 | int lzma_decompress_to_file(const char *input, int output_fd); | ||
108 | #endif | ||
109 | |||
110 | int get_stack_size(const char *str, unsigned long *_size); | 102 | int get_stack_size(const char *str, unsigned long *_size); |
111 | 103 | ||
112 | int fetch_kernel_version(unsigned int *puint, | 104 | int fetch_kernel_version(unsigned int *puint, |
diff --git a/tools/perf/util/zlib.c b/tools/perf/util/zlib.c index 495a449fc25c..1329d843eb7b 100644 --- a/tools/perf/util/zlib.c +++ b/tools/perf/util/zlib.c | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <sys/mman.h> | 4 | #include <sys/mman.h> |
5 | #include <zlib.h> | 5 | #include <zlib.h> |
6 | 6 | ||
7 | #include "util/compress.h" | ||
7 | #include "util/util.h" | 8 | #include "util/util.h" |
8 | #include "util/debug.h" | 9 | #include "util/debug.h" |
9 | 10 | ||