aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/Makefile.config7
-rw-r--r--tools/perf/util/scripting-engines/trace-event-python.c4
2 files changed, 9 insertions, 2 deletions
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 2b941efadb04..27c9fbca7bd9 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -175,6 +175,10 @@ PYTHON_CONFIG_SQ := $(call shell-sq,$(PYTHON_CONFIG))
175PYTHON_EMBED_LDOPTS := $(shell $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null) 175PYTHON_EMBED_LDOPTS := $(shell $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null)
176PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null) 176PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null)
177 177
178ifeq ($(CC), clang)
179 PYTHON_EMBED_CCOPTS := $(filter-out -specs=%,$(PYTHON_EMBED_CCOPTS))
180endif
181
178FEATURE_CHECK_CFLAGS-libpython := $(PYTHON_EMBED_CCOPTS) 182FEATURE_CHECK_CFLAGS-libpython := $(PYTHON_EMBED_CCOPTS)
179FEATURE_CHECK_LDFLAGS-libpython := $(PYTHON_EMBED_LDOPTS) 183FEATURE_CHECK_LDFLAGS-libpython := $(PYTHON_EMBED_LDOPTS)
180FEATURE_CHECK_CFLAGS-libpython-version := $(PYTHON_EMBED_CCOPTS) 184FEATURE_CHECK_CFLAGS-libpython-version := $(PYTHON_EMBED_CCOPTS)
@@ -601,6 +605,9 @@ else
601 PYTHON_EMBED_LDFLAGS := $(call strip-libs,$(PYTHON_EMBED_LDOPTS)) 605 PYTHON_EMBED_LDFLAGS := $(call strip-libs,$(PYTHON_EMBED_LDOPTS))
602 PYTHON_EMBED_LIBADD := $(call grep-libs,$(PYTHON_EMBED_LDOPTS)) -lutil 606 PYTHON_EMBED_LIBADD := $(call grep-libs,$(PYTHON_EMBED_LDOPTS)) -lutil
603 PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null) 607 PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null)
608 ifeq ($(CC), clang)
609 PYTHON_EMBED_CCOPTS := $(filter-out -specs=%,$(PYTHON_EMBED_CCOPTS))
610 endif
604 FLAGS_PYTHON_EMBED := $(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS) 611 FLAGS_PYTHON_EMBED := $(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS)
605 612
606 ifneq ($(feature-libpython), 1) 613 ifneq ($(feature-libpython), 1)
diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c
index 089438da1f7f..89b532c47cc4 100644
--- a/tools/perf/util/scripting-engines/trace-event-python.c
+++ b/tools/perf/util/scripting-engines/trace-event-python.c
@@ -368,10 +368,10 @@ static PyObject *python_process_callchain(struct perf_sample *sample,
368 if (node->map) { 368 if (node->map) {
369 struct map *map = node->map; 369 struct map *map = node->map;
370 const char *dsoname = "[unknown]"; 370 const char *dsoname = "[unknown]";
371 if (map && map->dso && (map->dso->name || map->dso->long_name)) { 371 if (map && map->dso) {
372 if (symbol_conf.show_kernel_path && map->dso->long_name) 372 if (symbol_conf.show_kernel_path && map->dso->long_name)
373 dsoname = map->dso->long_name; 373 dsoname = map->dso->long_name;
374 else if (map->dso->name) 374 else
375 dsoname = map->dso->name; 375 dsoname = map->dso->name;
376 } 376 }
377 pydict_set_item_string_decref(pyelem, "dso", 377 pydict_set_item_string_decref(pyelem, "dso",