Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1621840 > unrolled thread
| Started by | David Carrillo-Cisneros <davidcc@google.com> |
|---|---|
| First post | 2017-04-12 08:50 +0200 |
| Last post | 2017-04-12 10:30 +0200 |
| Articles | 20 on this page of 25 — 5 participants |
Back to article view | Back to linux.kernel
[PATCH 0/6] perf tool: build and usage hints David Carrillo-Cisneros <davidcc@google.com> - 2017-04-12 08:50 +0200
[PATCH 1/6] perf tools: pass PYTHON config to feature detection David Carrillo-Cisneros <davidcc@google.com> - 2017-04-12 08:50 +0200
[tip:perf/core] perf tools: Pass PYTHON config to feature detection tip-bot for David Carrillo-Cisneros <tipbot@zytor.com> - 2017-04-17 10:50 +0200
[PATCH 5/6] perf tools: disable JVMTI if no ELF support available David Carrillo-Cisneros <davidcc@google.com> - 2017-04-12 08:50 +0200
Re: [PATCH 5/6] perf tools: disable JVMTI if no ELF support available Jiri Olsa <jolsa@redhat.com> - 2017-04-12 10:20 +0200
[PATCH 5/6] perf tools: disable JVMTI if no ELF support available David Carrillo-Cisneros <davidcc@google.com> - 2017-04-12 19:10 +0200
Re: [PATCH 5/6] perf tools: disable JVMTI if no ELF support available Jiri Olsa <jolsa@redhat.com> - 2017-04-12 19:40 +0200
Re: [PATCH 5/6] perf tools: disable JVMTI if no ELF support available Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-04-13 16:50 +0200
[tip:perf/core] perf tools: Disable JVMTI if no ELF support available tip-bot for David Carrillo-Cisneros <tipbot@zytor.com> - 2017-04-17 10:50 +0200
Re: [PATCH 5/6] perf tools: disable JVMTI if no ELF support available Kim Phillips <kim.phillips@arm.com> - 2017-04-13 13:50 +0200
[PATCH 2/6] tools build: fix feature redefine build flags David Carrillo-Cisneros <davidcc@google.com> - 2017-04-12 09:00 +0200
Re: [PATCH 2/6] tools build: fix feature redefine build flags Jiri Olsa <jolsa@redhat.com> - 2017-04-12 10:00 +0200
Re: [PATCH 2/6] tools build: fix feature redefine build flags David Carrillo-Cisneros <davidcc@google.com> - 2017-04-12 18:40 +0200
Re: [PATCH 2/6] tools build: fix feature redefine build flags Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-04-13 17:00 +0200
[PATCH 4/6] perf report: hint .perfconfig error when invalid sorting key David Carrillo-Cisneros <davidcc@google.com> - 2017-04-12 09:00 +0200
Re: [PATCH 4/6] perf report: hint .perfconfig error when invalid sorting key Jiri Olsa <jolsa@redhat.com> - 2017-04-12 10:20 +0200
Re: [PATCH 4/6] perf report: hint .perfconfig error when invalid sorting key David Carrillo-Cisneros <davidcc@google.com> - 2017-04-12 18:40 +0200
Re: [PATCH 4/6] perf report: hint .perfconfig error when invalid sorting key Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-04-13 17:00 +0200
[PATCH 3/6] perf util: hint missing file when tool tips fail to load David Carrillo-Cisneros <davidcc@google.com> - 2017-04-12 09:00 +0200
[tip:perf/core] perf util: Hint missing file when tool tips fail to load tip-bot for David Carrillo-Cisneros <tipbot@zytor.com> - 2017-04-17 10:50 +0200
[PATCH 2/6] tools build: fix feature detection redefinion of build flags David Carrillo-Cisneros <davidcc@google.com> - 2017-04-12 09:00 +0200
[tip:perf/core] tools build: Fix feature detection redefinion of build flags tip-bot for David Carrillo-Cisneros <tipbot@zytor.com> - 2017-04-17 10:50 +0200
[PATCH 6/6] Revert "perf tools: Fix include of linux/mman.h" David Carrillo-Cisneros <davidcc@google.com> - 2017-04-12 09:00 +0200
[tip:perf/core] Revert "perf tools: Fix include of linux/mman.h" tip-bot for David Carrillo-Cisneros <tipbot@zytor.com> - 2017-04-17 10:50 +0200
Re: [PATCH 0/6] perf tool: build and usage hints Jiri Olsa <jolsa@redhat.com> - 2017-04-12 10:30 +0200
Page 1 of 2 [1] 2 Next page →
| From | David Carrillo-Cisneros <davidcc@google.com> |
|---|---|
| Date | 2017-04-12 08:50 +0200 |
| Subject | [PATCH 0/6] perf tool: build and usage hints |
| Message-ID | <tvkgi-1az-5@gated-at.bofh.it> |
Minor build fixes and error condition hints. David Carrillo-Cisneros (6): perf tools: pass PYTHON config to feature detection tools build: fix feature detection redefinion of build flags perf util: hint missing file when tool tips fail to load perf report: hint .perfconfig error when invalid sorting key perf tools: disable JVMTI if no ELF support available Revert "perf tools: Fix include of linux/mman.h" tools/build/feature/Makefile | 12 ++++++------ tools/perf/Makefile.config | 35 +++++++++++++++-------------------- tools/perf/builtin-report.c | 5 ++++- tools/perf/util/event.c | 2 +- tools/perf/util/util.c | 2 +- 5 files changed, 27 insertions(+), 29 deletions(-) -- 2.12.2.715.g7642488e1d-goog
[toc] | [next] | [standalone]
| From | David Carrillo-Cisneros <davidcc@google.com> |
|---|---|
| Date | 2017-04-12 08:50 +0200 |
| Subject | [PATCH 1/6] perf tools: pass PYTHON config to feature detection |
| Message-ID | <tvkgi-1az-11@gated-at.bofh.it> |
| In reply to | #1621840 |
( This is a rebased version of https://lkml.org/lkml/2017/2/7/662 )
Python's CC and link Makefile variables were not passed to feature
detection, causing feature detection to use system's Python rather than
PYTHON_CONFIG's one. This created a mismatch between the detected Python
support and the one actually used by perf when PYTHON_CONFIG is specified.
Fix it by moving Python's variable initialization to before feature
detection and pass FLAGS_PYTHON_EMBED to Python's feature detection's
build target.
Signed-off-by: David Carrillo-Cisneros <davidcc@google.com>
---
tools/build/feature/Makefile | 2 +-
tools/perf/Makefile.config | 31 ++++++++++++-------------------
2 files changed, 13 insertions(+), 20 deletions(-)
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index 09c9626ea666..523e587fe05f 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -175,7 +175,7 @@ $(OUTPUT)test-libperl.bin:
$(BUILD) $(FLAGS_PERL_EMBED)
$(OUTPUT)test-libpython.bin:
- $(BUILD)
+ $(BUILD) $(FLAGS_PYTHON_EMBED)
$(OUTPUT)test-libpython-version.bin:
$(BUILD)
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 2b656de99495..cfd6015229a2 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -170,13 +170,20 @@ PYTHON2_CONFIG := \
override PYTHON_CONFIG := \
$(call get-executable-or-default,PYTHON_CONFIG,$(PYTHON2_CONFIG))
+grep-libs = $(filter -l%,$(1))
+strip-libs = $(filter-out -l%,$(1))
+
PYTHON_CONFIG_SQ := $(call shell-sq,$(PYTHON_CONFIG))
-PYTHON_EMBED_LDOPTS := $(shell $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null)
-PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null)
-
-ifeq ($(CC), clang)
- PYTHON_EMBED_CCOPTS := $(filter-out -specs=%,$(PYTHON_EMBED_CCOPTS))
+ifdef PYTHON_CONFIG
+ PYTHON_EMBED_LDOPTS := $(shell $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null)
+ PYTHON_EMBED_LDFLAGS := $(call strip-libs,$(PYTHON_EMBED_LDOPTS))
+ PYTHON_EMBED_LIBADD := $(call grep-libs,$(PYTHON_EMBED_LDOPTS)) -lutil
+ PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null)
+ ifeq ($(CC), clang)
+ PYTHON_EMBED_CCOPTS := $(filter-out -specs=%,$(PYTHON_EMBED_CCOPTS))
+ endif
+ FLAGS_PYTHON_EMBED := $(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS)
endif
FEATURE_CHECK_CFLAGS-libpython := $(PYTHON_EMBED_CCOPTS)
@@ -554,8 +561,6 @@ ifndef NO_GTK2
endif
endif
-grep-libs = $(filter -l%,$(1))
-strip-libs = $(filter-out -l%,$(1))
ifdef NO_LIBPERL
CFLAGS += -DNO_LIBPERL
@@ -603,21 +608,9 @@ else
$(call disable-python,No 'python-config' tool was found: disables Python support - please install python-devel/python-dev)
else
- PYTHON_CONFIG_SQ := $(call shell-sq,$(PYTHON_CONFIG))
-
- PYTHON_EMBED_LDOPTS := $(shell $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null)
- PYTHON_EMBED_LDFLAGS := $(call strip-libs,$(PYTHON_EMBED_LDOPTS))
- PYTHON_EMBED_LIBADD := $(call grep-libs,$(PYTHON_EMBED_LDOPTS)) -lutil
- PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null)
- ifeq ($(CC), clang)
- PYTHON_EMBED_CCOPTS := $(filter-out -specs=%,$(PYTHON_EMBED_CCOPTS))
- endif
- FLAGS_PYTHON_EMBED := $(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS)
-
ifneq ($(feature-libpython), 1)
$(call disable-python,No 'Python.h' (for Python 2.x support) was found: disables Python support - please install python-devel/python-dev)
else
-
ifneq ($(feature-libpython-version), 1)
$(warning Python 3 is not yet supported; please set)
$(warning PYTHON and/or PYTHON_CONFIG appropriately.)
--
2.12.2.715.g7642488e1d-goog
[toc] | [prev] | [next] | [standalone]
| From | tip-bot for David Carrillo-Cisneros <tipbot@zytor.com> |
|---|---|
| Date | 2017-04-17 10:50 +0200 |
| Subject | [tip:perf/core] perf tools: Pass PYTHON config to feature detection |
| Message-ID | <txawa-6Xn-3@gated-at.bofh.it> |
| In reply to | #1621843 |
Commit-ID: 7be6b3166ebf2c10c28ef5777d1b31a937ed8f7a
Gitweb: http://git.kernel.org/tip/7be6b3166ebf2c10c28ef5777d1b31a937ed8f7a
Author: David Carrillo-Cisneros <davidcc@google.com>
AuthorDate: Tue, 11 Apr 2017 23:49:13 -0700
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 12 Apr 2017 10:45:21 -0300
perf tools: Pass PYTHON config to feature detection
( This is a rebased version of https://lkml.org/lkml/2017/2/7/662 )
Python's CC and link Makefile variables were not passed to feature
detection, causing feature detection to use system's Python rather than
PYTHON_CONFIG's one. This created a mismatch between the detected Python
support and the one actually used by perf when PYTHON_CONFIG is
specified.
Fix it by moving Python's variable initialization to before feature
detection and pass FLAGS_PYTHON_EMBED to Python's feature detection's
build target.
Signed-off-by: David Carrillo-Cisneros <davidcc@google.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: He Kuang <hekuang@huawei.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Paul Turner <pjt@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Simon Que <sque@chromium.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/20170412064919.92449-2-davidcc@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/build/feature/Makefile | 2 +-
tools/perf/Makefile.config | 31 ++++++++++++-------------------
2 files changed, 13 insertions(+), 20 deletions(-)
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index 09c9626..523e587 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -175,7 +175,7 @@ $(OUTPUT)test-libperl.bin:
$(BUILD) $(FLAGS_PERL_EMBED)
$(OUTPUT)test-libpython.bin:
- $(BUILD)
+ $(BUILD) $(FLAGS_PYTHON_EMBED)
$(OUTPUT)test-libpython-version.bin:
$(BUILD)
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 2b656de..cfd6015 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -170,13 +170,20 @@ PYTHON2_CONFIG := \
override PYTHON_CONFIG := \
$(call get-executable-or-default,PYTHON_CONFIG,$(PYTHON2_CONFIG))
-PYTHON_CONFIG_SQ := $(call shell-sq,$(PYTHON_CONFIG))
+grep-libs = $(filter -l%,$(1))
+strip-libs = $(filter-out -l%,$(1))
-PYTHON_EMBED_LDOPTS := $(shell $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null)
-PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null)
+PYTHON_CONFIG_SQ := $(call shell-sq,$(PYTHON_CONFIG))
-ifeq ($(CC), clang)
- PYTHON_EMBED_CCOPTS := $(filter-out -specs=%,$(PYTHON_EMBED_CCOPTS))
+ifdef PYTHON_CONFIG
+ PYTHON_EMBED_LDOPTS := $(shell $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null)
+ PYTHON_EMBED_LDFLAGS := $(call strip-libs,$(PYTHON_EMBED_LDOPTS))
+ PYTHON_EMBED_LIBADD := $(call grep-libs,$(PYTHON_EMBED_LDOPTS)) -lutil
+ PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null)
+ ifeq ($(CC), clang)
+ PYTHON_EMBED_CCOPTS := $(filter-out -specs=%,$(PYTHON_EMBED_CCOPTS))
+ endif
+ FLAGS_PYTHON_EMBED := $(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS)
endif
FEATURE_CHECK_CFLAGS-libpython := $(PYTHON_EMBED_CCOPTS)
@@ -554,8 +561,6 @@ ifndef NO_GTK2
endif
endif
-grep-libs = $(filter -l%,$(1))
-strip-libs = $(filter-out -l%,$(1))
ifdef NO_LIBPERL
CFLAGS += -DNO_LIBPERL
@@ -603,21 +608,9 @@ else
$(call disable-python,No 'python-config' tool was found: disables Python support - please install python-devel/python-dev)
else
- PYTHON_CONFIG_SQ := $(call shell-sq,$(PYTHON_CONFIG))
-
- PYTHON_EMBED_LDOPTS := $(shell $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null)
- PYTHON_EMBED_LDFLAGS := $(call strip-libs,$(PYTHON_EMBED_LDOPTS))
- PYTHON_EMBED_LIBADD := $(call grep-libs,$(PYTHON_EMBED_LDOPTS)) -lutil
- PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null)
- ifeq ($(CC), clang)
- PYTHON_EMBED_CCOPTS := $(filter-out -specs=%,$(PYTHON_EMBED_CCOPTS))
- endif
- FLAGS_PYTHON_EMBED := $(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS)
-
ifneq ($(feature-libpython), 1)
$(call disable-python,No 'Python.h' (for Python 2.x support) was found: disables Python support - please install python-devel/python-dev)
else
-
ifneq ($(feature-libpython-version), 1)
$(warning Python 3 is not yet supported; please set)
$(warning PYTHON and/or PYTHON_CONFIG appropriately.)
[toc] | [prev] | [next] | [standalone]
| From | David Carrillo-Cisneros <davidcc@google.com> |
|---|---|
| Date | 2017-04-12 08:50 +0200 |
| Subject | [PATCH 5/6] perf tools: disable JVMTI if no ELF support available |
| Message-ID | <tvkgi-1az-25@gated-at.bofh.it> |
| In reply to | #1621840 |
The build of JVMTI depends on LIBELF (-lelf). Make Makefile.conf
check this dependendancy and notify user when not present.
Signed-off-by: David Carrillo-Cisneros <davidcc@google.com>
---
tools/perf/Makefile.config | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index cfd6015229a2..279c303b2c22 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -274,6 +274,7 @@ ifdef NO_LIBELF
NO_LIBUNWIND := 1
NO_LIBDW_DWARF_UNWIND := 1
NO_LIBBPF := 1
+ NO_JVMTI := 1
else
ifeq ($(feature-libelf), 0)
ifeq ($(feature-glibc), 1)
@@ -283,7 +284,7 @@ else
LIBC_SUPPORT := 1
endif
ifeq ($(LIBC_SUPPORT),1)
- msg := $(warning No libelf found, disables 'probe' tool and BPF support in 'perf record', please install libelf-dev, libelf-devel or elfutils-libelf-devel);
+ msg := $(warning No libelf found, disables 'probe' tool, jvmti, and BPF support in 'perf record', please install libelf-dev, libelf-devel or elfutils-libelf-devel);
NO_LIBELF := 1
NO_DWARF := 1
@@ -291,6 +292,7 @@ else
NO_LIBUNWIND := 1
NO_LIBDW_DWARF_UNWIND := 1
NO_LIBBPF := 1
+ NO_JVMTI := 1
else
ifneq ($(filter s% -static%,$(LDFLAGS),),)
msg := $(error No static glibc found, please install glibc-static);
--
2.12.2.715.g7642488e1d-goog
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2017-04-12 10:20 +0200 |
| Subject | Re: [PATCH 5/6] perf tools: disable JVMTI if no ELF support available |
| Message-ID | <tvlFn-284-1@gated-at.bofh.it> |
| In reply to | #1621845 |
On Tue, Apr 11, 2017 at 11:49:18PM -0700, David Carrillo-Cisneros wrote: > The build of JVMTI depends on LIBELF (-lelf). Make Makefile.conf > check this dependendancy and notify user when not present. > > Signed-off-by: David Carrillo-Cisneros <davidcc@google.com> > --- > tools/perf/Makefile.config | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config > index cfd6015229a2..279c303b2c22 100644 > --- a/tools/perf/Makefile.config > +++ b/tools/perf/Makefile.config > @@ -274,6 +274,7 @@ ifdef NO_LIBELF > NO_LIBUNWIND := 1 > NO_LIBDW_DWARF_UNWIND := 1 > NO_LIBBPF := 1 > + NO_JVMTI := 1 > else > ifeq ($(feature-libelf), 0) > ifeq ($(feature-glibc), 1) > @@ -283,7 +284,7 @@ else > LIBC_SUPPORT := 1 > endif > ifeq ($(LIBC_SUPPORT),1) > - msg := $(warning No libelf found, disables 'probe' tool and BPF support in 'perf record', please install libelf-dev, libelf-devel or elfutils-libelf-devel); > + msg := $(warning No libelf found, disables 'probe' tool, jvmti, and BPF support in 'perf record', please install libelf-dev, libelf-devel or elfutils-libelf-devel); nitpick ;-) s/jvmti,/jvmti / jirka
[toc] | [prev] | [next] | [standalone]
| From | David Carrillo-Cisneros <davidcc@google.com> |
|---|---|
| Date | 2017-04-12 19:10 +0200 |
| Subject | [PATCH 5/6] perf tools: disable JVMTI if no ELF support available |
| Message-ID | <tvtWh-7dn-3@gated-at.bofh.it> |
| In reply to | #1621906 |
The build of JVMTI depends on LIBELF (-lelf). Make Makefile.conf
check this dependendancy and notify user when not present.
v2: Comma nitpicking.
Signed-off-by: David Carrillo-Cisneros <davidcc@google.com>
---
tools/perf/Makefile.config | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index cfd6015229a2..279c303b2c22 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -274,6 +274,7 @@ ifdef NO_LIBELF
NO_LIBUNWIND := 1
NO_LIBDW_DWARF_UNWIND := 1
NO_LIBBPF := 1
+ NO_JVMTI := 1
else
ifeq ($(feature-libelf), 0)
ifeq ($(feature-glibc), 1)
@@ -283,7 +284,7 @@ else
LIBC_SUPPORT := 1
endif
ifeq ($(LIBC_SUPPORT),1)
- msg := $(warning No libelf found, disables 'probe' tool and BPF support in 'perf record', please install libelf-dev, libelf-devel or elfutils-libelf-devel);
+ msg := $(warning No libelf found. Disables 'probe' tool, jvmti and BPF support in 'perf record'. Please install libelf-dev, libelf-devel or elfutils-libelf-devel);
NO_LIBELF := 1
NO_DWARF := 1
@@ -291,6 +292,7 @@ else
NO_LIBUNWIND := 1
NO_LIBDW_DWARF_UNWIND := 1
NO_LIBBPF := 1
+ NO_JVMTI := 1
else
ifneq ($(filter s% -static%,$(LDFLAGS),),)
msg := $(error No static glibc found, please install glibc-static);
--
2.12.2.715.g7642488e1d-goog
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2017-04-12 19:40 +0200 |
| Subject | Re: [PATCH 5/6] perf tools: disable JVMTI if no ELF support available |
| Message-ID | <tvupk-7nO-23@gated-at.bofh.it> |
| In reply to | #1622374 |
On Wed, Apr 12, 2017 at 10:07:45AM -0700, David Carrillo-Cisneros wrote: > The build of JVMTI depends on LIBELF (-lelf). Make Makefile.conf > check this dependendancy and notify user when not present. > > v2: Comma nitpicking. I think Arnaldo would change that.. but thanks! ;-) jirka > > Signed-off-by: David Carrillo-Cisneros <davidcc@google.com> > --- > tools/perf/Makefile.config | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config > index cfd6015229a2..279c303b2c22 100644 > --- a/tools/perf/Makefile.config > +++ b/tools/perf/Makefile.config > @@ -274,6 +274,7 @@ ifdef NO_LIBELF > NO_LIBUNWIND := 1 > NO_LIBDW_DWARF_UNWIND := 1 > NO_LIBBPF := 1 > + NO_JVMTI := 1 > else > ifeq ($(feature-libelf), 0) > ifeq ($(feature-glibc), 1) > @@ -283,7 +284,7 @@ else > LIBC_SUPPORT := 1 > endif > ifeq ($(LIBC_SUPPORT),1) > - msg := $(warning No libelf found, disables 'probe' tool and BPF support in 'perf record', please install libelf-dev, libelf-devel or elfutils-libelf-devel); > + msg := $(warning No libelf found. Disables 'probe' tool, jvmti and BPF support in 'perf record'. Please install libelf-dev, libelf-devel or elfutils-libelf-devel); > > NO_LIBELF := 1 > NO_DWARF := 1 > @@ -291,6 +292,7 @@ else > NO_LIBUNWIND := 1 > NO_LIBDW_DWARF_UNWIND := 1 > NO_LIBBPF := 1 > + NO_JVMTI := 1 > else > ifneq ($(filter s% -static%,$(LDFLAGS),),) > msg := $(error No static glibc found, please install glibc-static); > -- > 2.12.2.715.g7642488e1d-goog >
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2017-04-13 16:50 +0200 |
| Subject | Re: [PATCH 5/6] perf tools: disable JVMTI if no ELF support available |
| Message-ID | <tvOem-4jh-9@gated-at.bofh.it> |
| In reply to | #1622414 |
Em Wed, Apr 12, 2017 at 07:33:22PM +0200, Jiri Olsa escreveu: > On Wed, Apr 12, 2017 at 10:07:45AM -0700, David Carrillo-Cisneros wrote: > > The build of JVMTI depends on LIBELF (-lelf). Make Makefile.conf > > check this dependendancy and notify user when not present. > > > > v2: Comma nitpicking. > > I think Arnaldo would change that.. but thanks! ;-) But its so great that you guys offloaded that nitpicking part from me... ;-) Thanks, applied, together with Kim's Tested-by. - Arnaldo > jirka > > > > > Signed-off-by: David Carrillo-Cisneros <davidcc@google.com> > > --- > > tools/perf/Makefile.config | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config > > index cfd6015229a2..279c303b2c22 100644 > > --- a/tools/perf/Makefile.config > > +++ b/tools/perf/Makefile.config > > @@ -274,6 +274,7 @@ ifdef NO_LIBELF > > NO_LIBUNWIND := 1 > > NO_LIBDW_DWARF_UNWIND := 1 > > NO_LIBBPF := 1 > > + NO_JVMTI := 1 > > else > > ifeq ($(feature-libelf), 0) > > ifeq ($(feature-glibc), 1) > > @@ -283,7 +284,7 @@ else > > LIBC_SUPPORT := 1 > > endif > > ifeq ($(LIBC_SUPPORT),1) > > - msg := $(warning No libelf found, disables 'probe' tool and BPF support in 'perf record', please install libelf-dev, libelf-devel or elfutils-libelf-devel); > > + msg := $(warning No libelf found. Disables 'probe' tool, jvmti and BPF support in 'perf record'. Please install libelf-dev, libelf-devel or elfutils-libelf-devel); > > > > NO_LIBELF := 1 > > NO_DWARF := 1 > > @@ -291,6 +292,7 @@ else > > NO_LIBUNWIND := 1 > > NO_LIBDW_DWARF_UNWIND := 1 > > NO_LIBBPF := 1 > > + NO_JVMTI := 1 > > else > > ifneq ($(filter s% -static%,$(LDFLAGS),),) > > msg := $(error No static glibc found, please install glibc-static); > > -- > > 2.12.2.715.g7642488e1d-goog > >
[toc] | [prev] | [next] | [standalone]
| From | tip-bot for David Carrillo-Cisneros <tipbot@zytor.com> |
|---|---|
| Date | 2017-04-17 10:50 +0200 |
| Subject | [tip:perf/core] perf tools: Disable JVMTI if no ELF support available |
| Message-ID | <txawa-6Xn-1@gated-at.bofh.it> |
| In reply to | #1622374 |
Commit-ID: e5e992a7c184c2121adf37bdf292a516af81dbbb
Gitweb: http://git.kernel.org/tip/e5e992a7c184c2121adf37bdf292a516af81dbbb
Author: David Carrillo-Cisneros <davidcc@google.com>
AuthorDate: Wed, 12 Apr 2017 10:07:45 -0700
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 13 Apr 2017 11:47:43 -0300
perf tools: Disable JVMTI if no ELF support available
The build of JVMTI depends on LIBELF (-lelf). Make Makefile.conf
check this dependendancy and notify user when not present.
v2: Comma nitpicking.
Signed-off-by: David Carrillo-Cisneros <davidcc@google.com>
Tested-by: Kim Phillips <kim.phillips@arm.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: He Kuang <hekuang@huawei.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Paul Turner <pjt@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Simon Que <sque@chromium.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/20170412170745.26620-1-davidcc@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/Makefile.config | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index cfd6015..8354d04 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -274,6 +274,7 @@ ifdef NO_LIBELF
NO_LIBUNWIND := 1
NO_LIBDW_DWARF_UNWIND := 1
NO_LIBBPF := 1
+ NO_JVMTI := 1
else
ifeq ($(feature-libelf), 0)
ifeq ($(feature-glibc), 1)
@@ -283,7 +284,7 @@ else
LIBC_SUPPORT := 1
endif
ifeq ($(LIBC_SUPPORT),1)
- msg := $(warning No libelf found, disables 'probe' tool and BPF support in 'perf record', please install libelf-dev, libelf-devel or elfutils-libelf-devel);
+ msg := $(warning No libelf found. Disables 'probe' tool, jvmti and BPF support in 'perf record'. Please install libelf-dev, libelf-devel or elfutils-libelf-devel);
NO_LIBELF := 1
NO_DWARF := 1
@@ -291,6 +292,7 @@ else
NO_LIBUNWIND := 1
NO_LIBDW_DWARF_UNWIND := 1
NO_LIBBPF := 1
+ NO_JVMTI := 1
else
ifneq ($(filter s% -static%,$(LDFLAGS),),)
msg := $(error No static glibc found, please install glibc-static);
[toc] | [prev] | [next] | [standalone]
| From | Kim Phillips <kim.phillips@arm.com> |
|---|---|
| Date | 2017-04-13 13:50 +0200 |
| Subject | Re: [PATCH 5/6] perf tools: disable JVMTI if no ELF support available |
| Message-ID | <tvLq9-2qX-1@gated-at.bofh.it> |
| In reply to | #1621845 |
On Tue, 11 Apr 2017 23:49:18 -0700 David Carrillo-Cisneros <davidcc@google.com> wrote: > The build of JVMTI depends on LIBELF (-lelf). Make Makefile.conf > check this dependendancy and notify user when not present. > > Signed-off-by: David Carrillo-Cisneros <davidcc@google.com> > --- This fixes cross-building perf for arm64 on Ubuntu, as well as native. Before this patch this error: LINK libperf-jvmti.so /usr/lib/gcc-cross/aarch64-linux-gnu/6/../../../../aarch64-linux-gnu/bin/ld: cannot find -lelf collect2: error: ld returned 1 exit status was avoided with make NO_JVMTI=1. So for this and the rest of the series, FWIW: Tested-by: Kim Phillips <kim.phillips@arm.com> Thanks, Kim
[toc] | [prev] | [next] | [standalone]
| From | David Carrillo-Cisneros <davidcc@google.com> |
|---|---|
| Date | 2017-04-12 09:00 +0200 |
| Subject | [PATCH 2/6] tools build: fix feature redefine build flags |
| Message-ID | <tvkpX-1dW-1@gated-at.bofh.it> |
| In reply to | #1621840 |
This change is a follow up of https://lkml.org/lkml/2017/2/2/16
The patch above avoided redefining CC, CXX and PKG_CONFIG in feature
detection. The patch was not merged due to a unsolved concern with
the -MD flag.
Later, commit c8c188679c ("tools build: Use the same CC for feature
detection and actual build")
did the change for CC and CXX but not PKG_CONFIG.
This patch makes PKG_CONFIG consistent with CC and CXX and moves
the -MD to CFLAGS, as suggested by Jiri in the thread above.
Signed-off-by: David Carrillo-Cisneros <davidcc@google.com>
---
tools/build/feature/Makefile | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index 523e587fe05f..e35e4e5ad192 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -53,17 +53,17 @@ FILES= \
FILES := $(addprefix $(OUTPUT),$(FILES))
-CC ?= $(CROSS_COMPILE)gcc -MD
-CXX ?= $(CROSS_COMPILE)g++ -MD
-PKG_CONFIG := $(CROSS_COMPILE)pkg-config
+CC ?= $(CROSS_COMPILE)gcc
+CXX ?= $(CROSS_COMPILE)g++
+PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config
LLVM_CONFIG ?= llvm-config
all: $(FILES)
-__BUILD = $(CC) $(CFLAGS) -Wall -Werror -o $@ $(patsubst %.bin,%.c,$(@F)) $(LDFLAGS)
+__BUILD = $(CC) $(CFLAGS) -MD -Wall -Werror -o $@ $(patsubst %.bin,%.c,$(@F)) $(LDFLAGS)
BUILD = $(__BUILD) > $(@:.bin=.make.output) 2>&1
-__BUILDXX = $(CXX) $(CXXFLAGS) -Wall -Werror -o $@ $(patsubst %.bin,%.cpp,$(@F)) $(LDFLAGS)
+__BUILDXX = $(CXX) $(CXXFLAGS) -MD -Wall -Werror -o $@ $(patsubst %.bin,%.cpp,$(@F)) $(LDFLAGS)
BUILDXX = $(__BUILDXX) > $(@:.bin=.make.output) 2>&1
###############################
--
2.12.2.715.g7642488e1d-goog
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2017-04-12 10:00 +0200 |
| Subject | Re: [PATCH 2/6] tools build: fix feature redefine build flags |
| Message-ID | <tvlm1-1MB-1@gated-at.bofh.it> |
| In reply to | #1621846 |
On Tue, Apr 11, 2017 at 11:49:15PM -0700, David Carrillo-Cisneros wrote:
> This change is a follow up of https://lkml.org/lkml/2017/2/2/16
hi,
there's another 2/6 in this patchset with same change but
slightly different changelog
jirka
>
> The patch above avoided redefining CC, CXX and PKG_CONFIG in feature
> detection. The patch was not merged due to a unsolved concern with
> the -MD flag.
>
> Later, commit c8c188679c ("tools build: Use the same CC for feature
> detection and actual build")
> did the change for CC and CXX but not PKG_CONFIG.
>
> This patch makes PKG_CONFIG consistent with CC and CXX and moves
> the -MD to CFLAGS, as suggested by Jiri in the thread above.
>
> Signed-off-by: David Carrillo-Cisneros <davidcc@google.com>
> ---
> tools/build/feature/Makefile | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
> index 523e587fe05f..e35e4e5ad192 100644
> --- a/tools/build/feature/Makefile
> +++ b/tools/build/feature/Makefile
> @@ -53,17 +53,17 @@ FILES= \
>
> FILES := $(addprefix $(OUTPUT),$(FILES))
>
> -CC ?= $(CROSS_COMPILE)gcc -MD
> -CXX ?= $(CROSS_COMPILE)g++ -MD
> -PKG_CONFIG := $(CROSS_COMPILE)pkg-config
> +CC ?= $(CROSS_COMPILE)gcc
> +CXX ?= $(CROSS_COMPILE)g++
> +PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config
> LLVM_CONFIG ?= llvm-config
>
> all: $(FILES)
>
> -__BUILD = $(CC) $(CFLAGS) -Wall -Werror -o $@ $(patsubst %.bin,%.c,$(@F)) $(LDFLAGS)
> +__BUILD = $(CC) $(CFLAGS) -MD -Wall -Werror -o $@ $(patsubst %.bin,%.c,$(@F)) $(LDFLAGS)
> BUILD = $(__BUILD) > $(@:.bin=.make.output) 2>&1
>
> -__BUILDXX = $(CXX) $(CXXFLAGS) -Wall -Werror -o $@ $(patsubst %.bin,%.cpp,$(@F)) $(LDFLAGS)
> +__BUILDXX = $(CXX) $(CXXFLAGS) -MD -Wall -Werror -o $@ $(patsubst %.bin,%.cpp,$(@F)) $(LDFLAGS)
> BUILDXX = $(__BUILDXX) > $(@:.bin=.make.output) 2>&1
>
> ###############################
> --
> 2.12.2.715.g7642488e1d-goog
>
[toc] | [prev] | [next] | [standalone]
| From | David Carrillo-Cisneros <davidcc@google.com> |
|---|---|
| Date | 2017-04-12 18:40 +0200 |
| Subject | Re: [PATCH 2/6] tools build: fix feature redefine build flags |
| Message-ID | <tvttg-6Mv-35@gated-at.bofh.it> |
| In reply to | #1621895 |
On Wed, Apr 12, 2017 at 12:56 AM Jiri Olsa <jolsa@redhat.com> wrote: > > On Tue, Apr 11, 2017 at 11:49:15PM -0700, David Carrillo-Cisneros wrote: > > This change is a follow up of https://lkml.org/lkml/2017/2/2/16 > > hi, > there's another 2/6 in this patchset with same change but > slightly different changelog Uups, I did not rm the old version before sending. The other one is the latest version. Thanks, David
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2017-04-13 17:00 +0200 |
| Subject | Re: [PATCH 2/6] tools build: fix feature redefine build flags |
| Message-ID | <tvOo3-4nr-25@gated-at.bofh.it> |
| In reply to | #1622324 |
Em Wed, Apr 12, 2017 at 09:30:05AM -0700, David Carrillo-Cisneros escreveu: > On Wed, Apr 12, 2017 at 12:56 AM Jiri Olsa <jolsa@redhat.com> wrote: > > > > On Tue, Apr 11, 2017 at 11:49:15PM -0700, David Carrillo-Cisneros wrote: > > > This change is a follow up of https://lkml.org/lkml/2017/2/2/16 > > > > hi, > > there's another 2/6 in this patchset with same change but > > slightly different changelog > > > Uups, I did not rm the old version before sending. The other one is > the latest version. Ok, applied the other
[toc] | [prev] | [next] | [standalone]
| From | David Carrillo-Cisneros <davidcc@google.com> |
|---|---|
| Date | 2017-04-12 09:00 +0200 |
| Subject | [PATCH 4/6] perf report: hint .perfconfig error when invalid sorting key |
| Message-ID | <tvkpY-1dW-11@gated-at.bofh.it> |
| In reply to | #1621840 |
My fat-fingering of sort keys in .perfconfig was a common cause of
perf report silently terminating without apparent error.
This was because 1) error in setup_sorting in cmd_report was ignored
and 2) no message was log in UI browser that would prevent UI from
exit before user prompt. Fix both.
Signed-off-by: David Carrillo-Cisneros <davidcc@google.com>
---
tools/perf/builtin-report.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index c18158b83eb1..19a69ca0e9c9 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -987,12 +987,15 @@ int cmd_report(int argc, const char **argv)
else
use_browser = 0;
- if (setup_sorting(session->evlist) < 0) {
+ ret = setup_sorting(session->evlist);
+ if (ret < 0) {
if (sort_order)
parse_options_usage(report_usage, options, "s", 1);
if (field_order)
parse_options_usage(sort_order ? NULL : report_usage,
options, "F", 1);
+ if (!sort_order && !field_order)
+ pr_err("Couldn't setup sort order. Is .perfconfig correct?\n");
goto error;
}
--
2.12.2.715.g7642488e1d-goog
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2017-04-12 10:20 +0200 |
| Subject | Re: [PATCH 4/6] perf report: hint .perfconfig error when invalid sorting key |
| Message-ID | <tvlFo-284-23@gated-at.bofh.it> |
| In reply to | #1621850 |
On Tue, Apr 11, 2017 at 11:49:17PM -0700, David Carrillo-Cisneros wrote:
> My fat-fingering of sort keys in .perfconfig was a common cause of
> perf report silently terminating without apparent error.
>
> This was because 1) error in setup_sorting in cmd_report was ignored
> and 2) no message was log in UI browser that would prevent UI from
> exit before user prompt. Fix both.
there's UI init ahead of this code.. I had to move it
below your code to spot any error message
there's other errors further on.. perhaps we should move it even further ;-)
or cancel the ui before the error is printed
jirka
---
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 19a69ca0e9c9..abcf3aadca9e 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -982,11 +982,6 @@ int cmd_report(int argc, const char **argv)
if (report.header || report.header_only || report.show_threads)
use_browser = 0;
- if (strcmp(input_name, "-") != 0)
- setup_browser(true);
- else
- use_browser = 0;
-
ret = setup_sorting(session->evlist);
if (ret < 0) {
if (sort_order)
@@ -999,6 +994,11 @@ int cmd_report(int argc, const char **argv)
goto error;
}
+ if (strcmp(input_name, "-") != 0)
+ setup_browser(true);
+ else
+ use_browser = 0;
+
if ((report.header || report.header_only) && !quiet) {
perf_session__fprintf_info(session, stdout,
report.show_full_info);
[toc] | [prev] | [next] | [standalone]
| From | David Carrillo-Cisneros <davidcc@google.com> |
|---|---|
| Date | 2017-04-12 18:40 +0200 |
| Subject | Re: [PATCH 4/6] perf report: hint .perfconfig error when invalid sorting key |
| Message-ID | <tvttf-6Mv-7@gated-at.bofh.it> |
| In reply to | #1621914 |
> On Tue, Apr 11, 2017 at 11:49:17PM -0700, David Carrillo-Cisneros wrote:
>> My fat-fingering of sort keys in .perfconfig was a common cause of
>> perf report silently terminating without apparent error.
>>
>> This was because 1) error in setup_sorting in cmd_report was ignored
>> and 2) no message was log in UI browser that would prevent UI from
>> exit before user prompt. Fix both.
>
> there's UI init ahead of this code.. I had to move it
> below your code to spot any error message
>
> there's other errors further on.. perhaps we should move it even further ;-)
> or cancel the ui before the error is printed
Probably canceling ui on error is the more robust way to go. I will
look into it.
Thanks,
David
>
> jirka
>
>
> ---
> diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
> index 19a69ca0e9c9..abcf3aadca9e 100644
> --- a/tools/perf/builtin-report.c
> +++ b/tools/perf/builtin-report.c
> @@ -982,11 +982,6 @@ int cmd_report(int argc, const char **argv)
> if (report.header || report.header_only || report.show_threads)
> use_browser = 0;
>
> - if (strcmp(input_name, "-") != 0)
> - setup_browser(true);
> - else
> - use_browser = 0;
> -
> ret = setup_sorting(session->evlist);
> if (ret < 0) {
> if (sort_order)
> @@ -999,6 +994,11 @@ int cmd_report(int argc, const char **argv)
> goto error;
> }
>
> + if (strcmp(input_name, "-") != 0)
> + setup_browser(true);
> + else
> + use_browser = 0;
> +
> if ((report.header || report.header_only) && !quiet) {
> perf_session__fprintf_info(session, stdout,
> report.show_full_info);
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2017-04-13 17:00 +0200 |
| Subject | Re: [PATCH 4/6] perf report: hint .perfconfig error when invalid sorting key |
| Message-ID | <tvOo3-4nr-29@gated-at.bofh.it> |
| In reply to | #1622315 |
Em Wed, Apr 12, 2017 at 09:34:37AM -0700, David Carrillo-Cisneros escreveu: > > On Tue, Apr 11, 2017 at 11:49:17PM -0700, David Carrillo-Cisneros wrote: > >> My fat-fingering of sort keys in .perfconfig was a common cause of > >> perf report silently terminating without apparent error. > >> > >> This was because 1) error in setup_sorting in cmd_report was ignored > >> and 2) no message was log in UI browser that would prevent UI from > >> exit before user prompt. Fix both. > > > > there's UI init ahead of this code.. I had to move it > > below your code to spot any error message > > > > there's other errors further on.. perhaps we should move it even further ;-) > > or cancel the ui before the error is printed > > Probably canceling ui on error is the more robust way to go. I will > look into it. So I'll wait for a v2 for this specific patch.
[toc] | [prev] | [next] | [standalone]
| From | David Carrillo-Cisneros <davidcc@google.com> |
|---|---|
| Date | 2017-04-12 09:00 +0200 |
| Subject | [PATCH 3/6] perf util: hint missing file when tool tips fail to load |
| Message-ID | <tvkpY-1dW-19@gated-at.bofh.it> |
| In reply to | #1621840 |
Besides memory allocation failure, tips.txt may fail to load
because the file is not found (a more likely cause).
Communicate that to the user in tips failure warning.
Signed-off-by: David Carrillo-Cisneros <davidcc@google.com>
---
tools/perf/util/util.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
index d8b45cea54d0..6097d87429e2 100644
--- a/tools/perf/util/util.c
+++ b/tools/perf/util/util.c
@@ -696,7 +696,8 @@ const char *perf_tip(const char *dirpath)
tips = strlist__new("tips.txt", &conf);
if (tips == NULL)
- return errno == ENOENT ? NULL : "Tip: get more memory! ;-p";
+ return errno == ENOENT ? NULL :
+ "Tip: check path of tips.txt or get more memory! ;-p";
if (strlist__nr_entries(tips) == 0)
goto out;
--
2.12.2.715.g7642488e1d-goog
[toc] | [prev] | [next] | [standalone]
| From | tip-bot for David Carrillo-Cisneros <tipbot@zytor.com> |
|---|---|
| Date | 2017-04-17 10:50 +0200 |
| Subject | [tip:perf/core] perf util: Hint missing file when tool tips fail to load |
| Message-ID | <txawb-6Xn-21@gated-at.bofh.it> |
| In reply to | #1621852 |
Commit-ID: 570eda03213a216a88566c0da7bfe175832cfaa4
Gitweb: http://git.kernel.org/tip/570eda03213a216a88566c0da7bfe175832cfaa4
Author: David Carrillo-Cisneros <davidcc@google.com>
AuthorDate: Tue, 11 Apr 2017 23:49:16 -0700
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 13 Apr 2017 11:52:51 -0300
perf util: Hint missing file when tool tips fail to load
Besides memory allocation failure, tips.txt may fail to load because the
file is not found (a more likely cause).
Communicate that to the user in tips failure warning.
Signed-off-by: David Carrillo-Cisneros <davidcc@google.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: He Kuang <hekuang@huawei.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Paul Turner <pjt@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Simon Que <sque@chromium.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/20170412064919.92449-5-davidcc@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/util.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
index d8b45ce..6097d87 100644
--- a/tools/perf/util/util.c
+++ b/tools/perf/util/util.c
@@ -696,7 +696,8 @@ const char *perf_tip(const char *dirpath)
tips = strlist__new("tips.txt", &conf);
if (tips == NULL)
- return errno == ENOENT ? NULL : "Tip: get more memory! ;-p";
+ return errno == ENOENT ? NULL :
+ "Tip: check path of tips.txt or get more memory! ;-p";
if (strlist__nr_entries(tips) == 0)
goto out;
[toc] | [prev] | [next] | [standalone]
Page 1 of 2 [1] 2 Next page →
Back to top | Article view | linux.kernel
csiph-web