Commit e710574d authored by Ingo Molnar's avatar Ingo Molnar

Merge branch 'perf/core' of...

Merge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
parents a34668f6 9941c96a
...@@ -181,9 +181,9 @@ strip-libs = $(filter-out -l%,$(1)) ...@@ -181,9 +181,9 @@ strip-libs = $(filter-out -l%,$(1))
$(OUTPUT)python/perf.so: $(PYRF_OBJS) $(OUTPUT)python/perf.so: $(PYRF_OBJS)
$(QUIET_GEN)CFLAGS='$(BASIC_CFLAGS)' $(PYTHON_WORD) util/setup.py \ $(QUIET_GEN)CFLAGS='$(BASIC_CFLAGS)' $(PYTHON_WORD) util/setup.py \
--quiet build_ext \ --quiet build_ext; \
--build-lib='$(OUTPUT)python' \ mkdir -p $(OUTPUT)python && \
--build-temp='$(OUTPUT)python/temp' cp $(PYTHON_EXTBUILD_LIB)perf.so $(OUTPUT)python/
# #
# No Perl scripts right now: # No Perl scripts right now:
# #
...@@ -509,9 +509,13 @@ else ...@@ -509,9 +509,13 @@ else
PYTHON_WORD := $(call shell-wordify,$(PYTHON)) PYTHON_WORD := $(call shell-wordify,$(PYTHON))
python-clean := $(PYTHON_WORD) util/setup.py clean \ # python extension build directories
--build-lib='$(OUTPUT)python' \ PYTHON_EXTBUILD := $(OUTPUT)python_ext_build/
--build-temp='$(OUTPUT)python/temp' PYTHON_EXTBUILD_LIB := $(PYTHON_EXTBUILD)lib/
PYTHON_EXTBUILD_TMP := $(PYTHON_EXTBUILD)tmp/
export PYTHON_EXTBUILD_LIB PYTHON_EXTBUILD_TMP
python-clean := rm -rf $(PYTHON_EXTBUILD) $(OUTPUT)python/perf.so
ifdef NO_LIBPYTHON ifdef NO_LIBPYTHON
$(call disable-python) $(call disable-python)
...@@ -868,6 +872,9 @@ install: all ...@@ -868,6 +872,9 @@ install: all
$(INSTALL) scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python' $(INSTALL) scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python'
$(INSTALL) scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin' $(INSTALL) scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin'
install-python_ext:
$(PYTHON_WORD) util/setup.py --quiet install --root='/$(DESTDIR_SQ)'
install-doc: install-doc:
$(MAKE) -C Documentation install $(MAKE) -C Documentation install
...@@ -895,7 +902,7 @@ quick-install-html: ...@@ -895,7 +902,7 @@ quick-install-html:
### Cleaning rules ### Cleaning rules
clean: clean:
$(RM) $(OUTPUT){*.o,*/*.o,*/*/*.o,*/*/*/*.o,$(LIB_FILE),perf-archive} $(RM) $(LIB_OBJS) $(BUILTIN_OBJS) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf.o $(LANG_BINDINGS)
$(RM) $(ALL_PROGRAMS) perf $(RM) $(ALL_PROGRAMS) perf
$(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope*
$(MAKE) -C Documentation/ clean $(MAKE) -C Documentation/ clean
......
...@@ -942,10 +942,10 @@ static const char *record_args[] = { ...@@ -942,10 +942,10 @@ static const char *record_args[] = {
"-f", "-f",
"-m", "1024", "-m", "1024",
"-c", "1", "-c", "1",
"-e", "lock:lock_acquire:r", "-e", "lock:lock_acquire",
"-e", "lock:lock_acquired:r", "-e", "lock:lock_acquired",
"-e", "lock:lock_contended:r", "-e", "lock:lock_contended",
"-e", "lock:lock_release:r", "-e", "lock:lock_release",
}; };
static int __cmd_record(int argc, const char **argv) static int __cmd_record(int argc, const char **argv)
......
...@@ -399,7 +399,6 @@ static int perf_config_global(void) ...@@ -399,7 +399,6 @@ static int perf_config_global(void)
int perf_config(config_fn_t fn, void *data) int perf_config(config_fn_t fn, void *data)
{ {
int ret = 0, found = 0; int ret = 0, found = 0;
char *repo_config = NULL;
const char *home = NULL; const char *home = NULL;
/* Setting $PERF_CONFIG makes perf read _only_ the given config file. */ /* Setting $PERF_CONFIG makes perf read _only_ the given config file. */
...@@ -421,12 +420,6 @@ int perf_config(config_fn_t fn, void *data) ...@@ -421,12 +420,6 @@ int perf_config(config_fn_t fn, void *data)
free(user_config); free(user_config);
} }
repo_config = perf_pathdup("config");
if (!access(repo_config, R_OK)) {
ret += perf_config_from_file(fn, repo_config, data);
found += 1;
}
free(repo_config);
if (found == 0) if (found == 0)
return -1; return -1;
return ret; return ret;
......
...@@ -1820,11 +1820,15 @@ static int convert_to_probe_trace_events(struct perf_probe_event *pev, ...@@ -1820,11 +1820,15 @@ static int convert_to_probe_trace_events(struct perf_probe_event *pev,
ret = -ENOMEM; ret = -ENOMEM;
goto error; goto error;
} }
if (module) {
tev->point.module = strdup(module); tev->point.module = strdup(module);
if (tev->point.module == NULL) { if (tev->point.module == NULL) {
ret = -ENOMEM; ret = -ENOMEM;
goto error; goto error;
} }
}
tev->point.offset = pev->point.offset; tev->point.offset = pev->point.offset;
tev->point.retprobe = pev->point.retprobe; tev->point.retprobe = pev->point.retprobe;
tev->nargs = pev->nargs; tev->nargs = pev->nargs;
......
...@@ -3,9 +3,27 @@ ...@@ -3,9 +3,27 @@
from distutils.core import setup, Extension from distutils.core import setup, Extension
from os import getenv from os import getenv
from distutils.command.build_ext import build_ext as _build_ext
from distutils.command.install_lib import install_lib as _install_lib
class build_ext(_build_ext):
def finalize_options(self):
_build_ext.finalize_options(self)
self.build_lib = build_lib
self.build_temp = build_tmp
class install_lib(_install_lib):
def finalize_options(self):
_install_lib.finalize_options(self)
self.build_dir = build_lib
cflags = ['-fno-strict-aliasing', '-Wno-write-strings'] cflags = ['-fno-strict-aliasing', '-Wno-write-strings']
cflags += getenv('CFLAGS', '').split() cflags += getenv('CFLAGS', '').split()
build_lib = getenv('PYTHON_EXTBUILD_LIB')
build_tmp = getenv('PYTHON_EXTBUILD_TMP')
perf = Extension('perf', perf = Extension('perf',
sources = ['util/python.c', 'util/ctype.c', 'util/evlist.c', sources = ['util/python.c', 'util/ctype.c', 'util/evlist.c',
'util/evsel.c', 'util/cpumap.c', 'util/thread_map.c', 'util/evsel.c', 'util/cpumap.c', 'util/thread_map.c',
...@@ -21,4 +39,5 @@ setup(name='perf', ...@@ -21,4 +39,5 @@ setup(name='perf',
author_email='acme@redhat.com', author_email='acme@redhat.com',
license='GPLv2', license='GPLv2',
url='http://perf.wiki.kernel.org', url='http://perf.wiki.kernel.org',
ext_modules=[perf]) ext_modules=[perf],
cmdclass={'build_ext': build_ext, 'install_lib': install_lib})
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment