diff options
| -rw-r--r-- | tools/perf/Makefile | 24 | ||||
| -rw-r--r-- | tools/perf/util/python.c | 2 | ||||
| -rw-r--r-- | tools/perf/util/setup.py | 3 |
3 files changed, 15 insertions, 14 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index f7c968ad5178..00deed4d6159 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
| @@ -184,9 +184,22 @@ SCRIPT_SH += perf-archive.sh | |||
| 184 | grep-libs = $(filter -l%,$(1)) | 184 | grep-libs = $(filter -l%,$(1)) |
| 185 | strip-libs = $(filter-out -l%,$(1)) | 185 | strip-libs = $(filter-out -l%,$(1)) |
| 186 | 186 | ||
| 187 | TRACE_EVENT_DIR = ../lib/traceevent/ | ||
| 188 | |||
| 189 | ifneq ($(OUTPUT),) | ||
| 190 | TE_PATH=$(OUTPUT) | ||
| 191 | else | ||
| 192 | TE_PATH=$(TRACE_EVENT_DIR) | ||
| 193 | endif | ||
| 194 | |||
| 195 | LIBTRACEEVENT = $(TE_PATH)libtraceevent.a | ||
| 196 | TE_LIB := -L$(TE_PATH) -ltraceevent | ||
| 197 | |||
| 187 | PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources) | 198 | PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources) |
| 188 | PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py | 199 | PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py |
| 189 | 200 | ||
| 201 | export LIBTRACEEVENT | ||
| 202 | |||
| 190 | $(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) | 203 | $(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) |
| 191 | $(QUIET_GEN)CFLAGS='$(BASIC_CFLAGS)' $(PYTHON_WORD) util/setup.py \ | 204 | $(QUIET_GEN)CFLAGS='$(BASIC_CFLAGS)' $(PYTHON_WORD) util/setup.py \ |
| 192 | --quiet build_ext; \ | 205 | --quiet build_ext; \ |
| @@ -198,17 +211,6 @@ $(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) | |||
| 198 | 211 | ||
| 199 | SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) | 212 | SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) |
| 200 | 213 | ||
| 201 | TRACE_EVENT_DIR = ../lib/traceevent/ | ||
| 202 | |||
| 203 | ifneq ($(OUTPUT),) | ||
| 204 | TE_PATH=$(OUTPUT) | ||
| 205 | else | ||
| 206 | TE_PATH=$(TRACE_EVENT_DIR) | ||
| 207 | endif | ||
| 208 | |||
| 209 | LIBTRACEEVENT = $(TE_PATH)libtraceevent.a | ||
| 210 | TE_LIB := -L$(TE_PATH) -ltraceevent | ||
| 211 | |||
| 212 | # | 214 | # |
| 213 | # Single 'perf' binary right now: | 215 | # Single 'perf' binary right now: |
| 214 | # | 216 | # |
diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c index a2657fd96837..9181bf212fb9 100644 --- a/tools/perf/util/python.c +++ b/tools/perf/util/python.c | |||
| @@ -1015,8 +1015,6 @@ PyMODINIT_FUNC initperf(void) | |||
| 1015 | pyrf_cpu_map__setup_types() < 0) | 1015 | pyrf_cpu_map__setup_types() < 0) |
| 1016 | return; | 1016 | return; |
| 1017 | 1017 | ||
| 1018 | page_size = sysconf(_SC_PAGE_SIZE); | ||
| 1019 | |||
| 1020 | Py_INCREF(&pyrf_evlist__type); | 1018 | Py_INCREF(&pyrf_evlist__type); |
| 1021 | PyModule_AddObject(module, "evlist", (PyObject*)&pyrf_evlist__type); | 1019 | PyModule_AddObject(module, "evlist", (PyObject*)&pyrf_evlist__type); |
| 1022 | 1020 | ||
diff --git a/tools/perf/util/setup.py b/tools/perf/util/setup.py index 09c3cea95d3b..73d510269784 100644 --- a/tools/perf/util/setup.py +++ b/tools/perf/util/setup.py | |||
| @@ -23,6 +23,7 @@ cflags += getenv('CFLAGS', '').split() | |||
| 23 | 23 | ||
| 24 | build_lib = getenv('PYTHON_EXTBUILD_LIB') | 24 | build_lib = getenv('PYTHON_EXTBUILD_LIB') |
| 25 | build_tmp = getenv('PYTHON_EXTBUILD_TMP') | 25 | build_tmp = getenv('PYTHON_EXTBUILD_TMP') |
| 26 | libtraceevent = getenv('LIBTRACEEVENT') | ||
| 26 | 27 | ||
| 27 | ext_sources = [f.strip() for f in file('util/python-ext-sources') | 28 | ext_sources = [f.strip() for f in file('util/python-ext-sources') |
| 28 | if len(f.strip()) > 0 and f[0] != '#'] | 29 | if len(f.strip()) > 0 and f[0] != '#'] |
| @@ -31,7 +32,7 @@ perf = Extension('perf', | |||
| 31 | sources = ext_sources, | 32 | sources = ext_sources, |
| 32 | include_dirs = ['util/include'], | 33 | include_dirs = ['util/include'], |
| 33 | extra_compile_args = cflags, | 34 | extra_compile_args = cflags, |
| 34 | extra_objects = [build_tmp + '/../../libtraceevent.a'], | 35 | extra_objects = [libtraceevent], |
| 35 | ) | 36 | ) |
| 36 | 37 | ||
| 37 | setup(name='perf', | 38 | setup(name='perf', |
