Skip to content

Commit b84defe

Browse files
author
Ingo Molnar
committed
Merge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/core
2 parents 8104a47 + cdb0861 commit b84defe

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

tools/perf/Makefile

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,9 @@ SCRIPT_SH += perf-archive.sh
325325
grep-libs = $(filter -l%,$(1))
326326
strip-libs = $(filter-out -l%,$(1))
327327

328-
pyrf: $(PYRF_OBJS)
329-
python util/setup.py build --build-base='$(OUTPUT)'
330-
328+
$(OUTPUT)python/perf.so: $(PYRF_OBJS)
329+
@python util/setup.py --quiet build_ext --build-lib='$(OUTPUT)python' \
330+
--build-temp='$(OUTPUT)python/temp'
331331
#
332332
# No Perl scripts right now:
333333
#
@@ -348,12 +348,14 @@ PROGRAMS += $(EXTRA_PROGRAMS)
348348
#
349349
PROGRAMS += $(OUTPUT)perf
350350

351+
LANG_BINDINGS =
352+
351353
# List built-in command $C whose implementation cmd_$C() is not in
352354
# builtin-$C.o but is linked in as part of some other command.
353355
#
354356

355357
# what 'all' will build and 'install' will install, in perfexecdir
356-
ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS) pyrf
358+
ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS)
357359

358360
# what 'all' will build but not install in perfexecdir
359361
OTHER_PROGRAMS = $(OUTPUT)perf$X
@@ -662,12 +664,14 @@ else
662664
PYTHON_EMBED_CCOPTS = `python-config --cflags 2>/dev/null`
663665
FLAGS_PYTHON_EMBED=$(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS)
664666
ifneq ($(call try-cc,$(SOURCE_PYTHON_EMBED),$(FLAGS_PYTHON_EMBED)),y)
667+
msg := $(warning No Python.h found, install python-dev[el] to have python support in 'perf script' and to build the python bindings)
665668
BASIC_CFLAGS += -DNO_LIBPYTHON
666669
else
667670
ALL_LDFLAGS += $(PYTHON_EMBED_LDFLAGS)
668671
EXTLIBS += $(PYTHON_EMBED_LIBADD)
669672
LIB_OBJS += $(OUTPUT)util/scripting-engines/trace-event-python.o
670673
LIB_OBJS += $(OUTPUT)scripts/python/Perf-Trace-Util/Context.o
674+
LANG_BINDINGS += $(OUTPUT)python/perf.so
671675
endif
672676
endif
673677

@@ -954,7 +958,7 @@ export TAR INSTALL DESTDIR SHELL_PATH
954958

955959
SHELL = $(SHELL_PATH)
956960

957-
all:: shell_compatibility_test $(ALL_PROGRAMS) $(BUILT_INS) $(OTHER_PROGRAMS) $(OUTPUT)PERF-BUILD-OPTIONS
961+
all:: shell_compatibility_test $(ALL_PROGRAMS) $(LANG_BINDINGS) $(BUILT_INS) $(OTHER_PROGRAMS) $(OUTPUT)PERF-BUILD-OPTIONS
958962
ifneq (,$X)
959963
$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) perf$X)), test '$p' -ef '$p$X' || $(RM) '$p';)
960964
endif
@@ -1287,17 +1291,17 @@ distclean: clean
12871291
# $(RM) configure
12881292

12891293
clean:
1290-
$(RM) *.o */*.o */*/*.o */*/*/*.o $(LIB_FILE)
1294+
$(RM) $(OUTPUT){*.o,*/*.o,*/*/*.o,*/*/*/*.o,$(LIB_FILE),perf-archive}
12911295
$(RM) $(ALL_PROGRAMS) $(BUILT_INS) perf$X
12921296
$(RM) $(TEST_PROGRAMS)
12931297
$(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope*
1294-
$(RM) -r autom4te.cache
1295-
$(RM) config.log config.mak.autogen config.mak.append config.status config.cache
12961298
$(RM) -r $(PERF_TARNAME) .doc-tmp-dir
12971299
$(RM) $(PERF_TARNAME).tar.gz perf-core_$(PERF_VERSION)-*.tar.gz
12981300
$(RM) $(htmldocs).tar.gz $(manpages).tar.gz
12991301
$(MAKE) -C Documentation/ clean
13001302
$(RM) $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)PERF-CFLAGS $(OUTPUT)PERF-BUILD-OPTIONS
1303+
@python util/setup.py clean --build-lib='$(OUTPUT)python' \
1304+
--build-temp='$(OUTPUT)python/temp'
13011305

13021306
.PHONY: all install clean strip
13031307
.PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell

tools/perf/builtin-stat.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,8 +748,8 @@ int cmd_stat(int argc, const char **argv, const char *prefix __used)
748748
out_free_fd:
749749
list_for_each_entry(pos, &evsel_list->entries, node)
750750
perf_evsel__free_stat_priv(pos);
751-
perf_evlist__delete(evsel_list);
752-
out:
753751
perf_evlist__delete_maps(evsel_list);
752+
out:
753+
perf_evlist__delete(evsel_list);
754754
return status;
755755
}

tools/perf/util/ui/libslang.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313

1414
#if SLANG_VERSION < 20104
1515
#define slsmg_printf(msg, args...) \
16-
SLsmg_printf((char *)msg, ##args)
16+
SLsmg_printf((char *)(msg), ##args)
1717
#define slsmg_write_nstring(msg, len) \
18-
SLsmg_write_nstring((char *)msg, len)
18+
SLsmg_write_nstring((char *)(msg), len)
1919
#define sltt_set_color(obj, name, fg, bg) \
20-
SLtt_set_color(obj,(char *)name, (char *)fg, (char *)bg)
20+
SLtt_set_color(obj,(char *)(name), (char *)(fg), (char *)(bg))
2121
#else
2222
#define slsmg_printf SLsmg_printf
2323
#define slsmg_write_nstring SLsmg_write_nstring

0 commit comments

Comments
 (0)