diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/Makefile | 8 | ||||
-rw-r--r-- | tools/perf/util/setup.py | 7 | ||||
-rw-r--r-- | tools/perf/util/symbol.c | 2 |
3 files changed, 14 insertions, 3 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 158c30e8210c..207dee5c5b16 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -165,8 +165,12 @@ grep-libs = $(filter -l%,$(1)) | |||
165 | strip-libs = $(filter-out -l%,$(1)) | 165 | strip-libs = $(filter-out -l%,$(1)) |
166 | 166 | ||
167 | $(OUTPUT)python/perf.so: $(PYRF_OBJS) | 167 | $(OUTPUT)python/perf.so: $(PYRF_OBJS) |
168 | $(QUIET_GEN)python util/setup.py --quiet build_ext --build-lib='$(OUTPUT)python' \ | 168 | $(QUIET_GEN)( \ |
169 | --build-temp='$(OUTPUT)python/temp' | 169 | export CFLAGS="$(BASIC_CFLAGS)"; \ |
170 | python util/setup.py --quiet build_ext --build-lib='$(OUTPUT)python' \ | ||
171 | --build-temp='$(OUTPUT)python/temp' \ | ||
172 | ) | ||
173 | |||
170 | # | 174 | # |
171 | # No Perl scripts right now: | 175 | # No Perl scripts right now: |
172 | # | 176 | # |
diff --git a/tools/perf/util/setup.py b/tools/perf/util/setup.py index e24ffadb20b2..bbc982f5dd8b 100644 --- a/tools/perf/util/setup.py +++ b/tools/perf/util/setup.py | |||
@@ -1,13 +1,18 @@ | |||
1 | #!/usr/bin/python2 | 1 | #!/usr/bin/python2 |
2 | 2 | ||
3 | from distutils.core import setup, Extension | 3 | from distutils.core import setup, Extension |
4 | from os import getenv | ||
5 | |||
6 | cflags = ['-fno-strict-aliasing', '-Wno-write-strings'] | ||
7 | cflags += getenv('CFLAGS', '').split() | ||
4 | 8 | ||
5 | perf = Extension('perf', | 9 | perf = Extension('perf', |
6 | sources = ['util/python.c', 'util/ctype.c', 'util/evlist.c', | 10 | sources = ['util/python.c', 'util/ctype.c', 'util/evlist.c', |
7 | 'util/evsel.c', 'util/cpumap.c', 'util/thread_map.c', | 11 | 'util/evsel.c', 'util/cpumap.c', 'util/thread_map.c', |
8 | 'util/util.c', 'util/xyarray.c', 'util/cgroup.c'], | 12 | 'util/util.c', 'util/xyarray.c', 'util/cgroup.c'], |
9 | include_dirs = ['util/include'], | 13 | include_dirs = ['util/include'], |
10 | extra_compile_args = ['-fno-strict-aliasing', '-Wno-write-strings']) | 14 | extra_compile_args = cflags, |
15 | ) | ||
11 | 16 | ||
12 | setup(name='perf', | 17 | setup(name='perf', |
13 | version='0.1', | 18 | version='0.1', |
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 8f73907a959e..f06c10f092ba 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c | |||
@@ -2406,6 +2406,8 @@ int symbol__init(void) | |||
2406 | if (symbol_conf.initialized) | 2406 | if (symbol_conf.initialized) |
2407 | return 0; | 2407 | return 0; |
2408 | 2408 | ||
2409 | symbol_conf.priv_size = ALIGN(symbol_conf.priv_size, sizeof(u64)); | ||
2410 | |||
2409 | elf_version(EV_CURRENT); | 2411 | elf_version(EV_CURRENT); |
2410 | if (symbol_conf.sort_by_name) | 2412 | if (symbol_conf.sort_by_name) |
2411 | symbol_conf.priv_size += (sizeof(struct symbol_name_rb_node) - | 2413 | symbol_conf.priv_size += (sizeof(struct symbol_name_rb_node) - |