linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] perf tool: build and usage hints
@ 2017-04-12  6:49 David Carrillo-Cisneros
  2017-04-12  6:49 ` [PATCH 1/6] perf tools: pass PYTHON config to feature detection David Carrillo-Cisneros
                   ` (7 more replies)
  0 siblings, 8 replies; 25+ messages in thread
From: David Carrillo-Cisneros @ 2017-04-12  6:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Andi Kleen, Simon Que, Wang Nan, Jiri Olsa,
	He Kuang, Masami Hiramatsu, Stephane Eranian, Paul Turner,
	David Carrillo-Cisneros

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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH 1/6] perf tools: pass PYTHON config to feature detection
  2017-04-12  6:49 [PATCH 0/6] perf tool: build and usage hints David Carrillo-Cisneros
@ 2017-04-12  6:49 ` David Carrillo-Cisneros
  2017-04-17  8:33   ` [tip:perf/core] perf tools: Pass " tip-bot for David Carrillo-Cisneros
  2017-04-12  6:49 ` [PATCH 2/6] tools build: fix feature detection redefinion of build flags David Carrillo-Cisneros
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 25+ messages in thread
From: David Carrillo-Cisneros @ 2017-04-12  6:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Andi Kleen, Simon Que, Wang Nan, Jiri Olsa,
	He Kuang, Masami Hiramatsu, Stephane Eranian, Paul Turner,
	David Carrillo-Cisneros

( 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

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 2/6] tools build: fix feature detection redefinion of build flags
  2017-04-12  6:49 [PATCH 0/6] perf tool: build and usage hints David Carrillo-Cisneros
  2017-04-12  6:49 ` [PATCH 1/6] perf tools: pass PYTHON config to feature detection David Carrillo-Cisneros
@ 2017-04-12  6:49 ` David Carrillo-Cisneros
  2017-04-17  8:35   ` [tip:perf/core] tools build: Fix " tip-bot for David Carrillo-Cisneros
  2017-04-12  6:49 ` [PATCH 2/6] tools build: fix feature redefine " David Carrillo-Cisneros
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 25+ messages in thread
From: David Carrillo-Cisneros @ 2017-04-12  6:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Andi Kleen, Simon Que, Wang Nan, Jiri Olsa,
	He Kuang, Masami Hiramatsu, Stephane Eranian, Paul Turner,
	David Carrillo-Cisneros

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 c8c188679ccf ("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

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 2/6] tools build: fix feature redefine build flags
  2017-04-12  6:49 [PATCH 0/6] perf tool: build and usage hints David Carrillo-Cisneros
  2017-04-12  6:49 ` [PATCH 1/6] perf tools: pass PYTHON config to feature detection David Carrillo-Cisneros
  2017-04-12  6:49 ` [PATCH 2/6] tools build: fix feature detection redefinion of build flags David Carrillo-Cisneros
@ 2017-04-12  6:49 ` David Carrillo-Cisneros
  2017-04-12  7:56   ` Jiri Olsa
  2017-04-12  6:49 ` [PATCH 3/6] perf util: hint missing file when tool tips fail to load David Carrillo-Cisneros
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 25+ messages in thread
From: David Carrillo-Cisneros @ 2017-04-12  6:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Andi Kleen, Simon Que, Wang Nan, Jiri Olsa,
	He Kuang, Masami Hiramatsu, Stephane Eranian, Paul Turner,
	David Carrillo-Cisneros

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

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 3/6] perf util: hint missing file when tool tips fail to load
  2017-04-12  6:49 [PATCH 0/6] perf tool: build and usage hints David Carrillo-Cisneros
                   ` (2 preceding siblings ...)
  2017-04-12  6:49 ` [PATCH 2/6] tools build: fix feature redefine " David Carrillo-Cisneros
@ 2017-04-12  6:49 ` David Carrillo-Cisneros
  2017-04-17  8:36   ` [tip:perf/core] perf util: Hint " tip-bot for David Carrillo-Cisneros
  2017-04-12  6:49 ` [PATCH 4/6] perf report: hint .perfconfig error when invalid sorting key David Carrillo-Cisneros
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 25+ messages in thread
From: David Carrillo-Cisneros @ 2017-04-12  6:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Andi Kleen, Simon Que, Wang Nan, Jiri Olsa,
	He Kuang, Masami Hiramatsu, Stephane Eranian, Paul Turner,
	David Carrillo-Cisneros

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

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 4/6] perf report: hint .perfconfig error when invalid sorting key
  2017-04-12  6:49 [PATCH 0/6] perf tool: build and usage hints David Carrillo-Cisneros
                   ` (3 preceding siblings ...)
  2017-04-12  6:49 ` [PATCH 3/6] perf util: hint missing file when tool tips fail to load David Carrillo-Cisneros
@ 2017-04-12  6:49 ` David Carrillo-Cisneros
  2017-04-12  8:17   ` Jiri Olsa
  2017-04-12  6:49 ` [PATCH 5/6] perf tools: disable JVMTI if no ELF support available David Carrillo-Cisneros
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 25+ messages in thread
From: David Carrillo-Cisneros @ 2017-04-12  6:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Andi Kleen, Simon Que, Wang Nan, Jiri Olsa,
	He Kuang, Masami Hiramatsu, Stephane Eranian, Paul Turner,
	David Carrillo-Cisneros

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

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 5/6] perf tools: disable JVMTI if no ELF support available
  2017-04-12  6:49 [PATCH 0/6] perf tool: build and usage hints David Carrillo-Cisneros
                   ` (4 preceding siblings ...)
  2017-04-12  6:49 ` [PATCH 4/6] perf report: hint .perfconfig error when invalid sorting key David Carrillo-Cisneros
@ 2017-04-12  6:49 ` David Carrillo-Cisneros
  2017-04-12  8:19   ` Jiri Olsa
  2017-04-13 11:40   ` [PATCH 5/6] perf tools: disable " Kim Phillips
  2017-04-12  6:49 ` [PATCH 6/6] Revert "perf tools: Fix include of linux/mman.h" David Carrillo-Cisneros
  2017-04-12  8:20 ` [PATCH 0/6] perf tool: build and usage hints Jiri Olsa
  7 siblings, 2 replies; 25+ messages in thread
From: David Carrillo-Cisneros @ 2017-04-12  6:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Andi Kleen, Simon Que, Wang Nan, Jiri Olsa,
	He Kuang, Masami Hiramatsu, Stephane Eranian, Paul Turner,
	David Carrillo-Cisneros

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

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 6/6] Revert "perf tools: Fix include of linux/mman.h"
  2017-04-12  6:49 [PATCH 0/6] perf tool: build and usage hints David Carrillo-Cisneros
                   ` (5 preceding siblings ...)
  2017-04-12  6:49 ` [PATCH 5/6] perf tools: disable JVMTI if no ELF support available David Carrillo-Cisneros
@ 2017-04-12  6:49 ` David Carrillo-Cisneros
  2017-04-17  8:36   ` [tip:perf/core] " tip-bot for David Carrillo-Cisneros
  2017-04-12  8:20 ` [PATCH 0/6] perf tool: build and usage hints Jiri Olsa
  7 siblings, 1 reply; 25+ messages in thread
From: David Carrillo-Cisneros @ 2017-04-12  6:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Andi Kleen, Simon Que, Wang Nan, Jiri Olsa,
	He Kuang, Masami Hiramatsu, Stephane Eranian, Paul Turner,
	David Carrillo-Cisneros

In https://lkml.org/lkml/2017/2/2/16 I reported a build error
that I believed was caused by wrong uapi includes. The synthom
 was fixed by Arnaldo in:

 commit 2f7db5557994 ("perf tools: Fix include of linux/mman.h")

but I was wrong attributing the problem to the uapi include.
The root cause was that I was using ARCH=x86_64, hence
using the wrong uapi include path. This explains why no one else
ran into this build problem.

Signed-off-by: David Carrillo-Cisneros <davidcc@google.com>
---
 tools/perf/util/event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index 76b9c6bc8369..1046a1a83f81 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -1,5 +1,5 @@
 #include <linux/types.h>
-#include <linux/mman.h> /* To get things like MAP_HUGETLB even on older libc headers */
+#include <uapi/linux/mman.h> /* To get things like MAP_HUGETLB even on older libc headers */
 #include <api/fs/fs.h>
 #include "event.h"
 #include "debug.h"
-- 
2.12.2.715.g7642488e1d-goog

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* Re: [PATCH 2/6] tools build: fix feature redefine build flags
  2017-04-12  6:49 ` [PATCH 2/6] tools build: fix feature redefine " David Carrillo-Cisneros
@ 2017-04-12  7:56   ` Jiri Olsa
  2017-04-12 16:30     ` David Carrillo-Cisneros
  0 siblings, 1 reply; 25+ messages in thread
From: Jiri Olsa @ 2017-04-12  7:56 UTC (permalink / raw)
  To: David Carrillo-Cisneros
  Cc: linux-kernel, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo, Alexander Shishkin, Andi Kleen,
	Simon Que, Wang Nan, Jiri Olsa, He Kuang, Masami Hiramatsu,
	Stephane Eranian, Paul Turner

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
> 

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 4/6] perf report: hint .perfconfig error when invalid sorting key
  2017-04-12  6:49 ` [PATCH 4/6] perf report: hint .perfconfig error when invalid sorting key David Carrillo-Cisneros
@ 2017-04-12  8:17   ` Jiri Olsa
  2017-04-12 16:34     ` David Carrillo-Cisneros
  0 siblings, 1 reply; 25+ messages in thread
From: Jiri Olsa @ 2017-04-12  8:17 UTC (permalink / raw)
  To: David Carrillo-Cisneros
  Cc: linux-kernel, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo, Alexander Shishkin, Andi Kleen,
	Simon Que, Wang Nan, Jiri Olsa, He Kuang, Masami Hiramatsu,
	Stephane Eranian, Paul Turner

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);

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* Re: [PATCH 5/6] perf tools: disable JVMTI if no ELF support available
  2017-04-12  6:49 ` [PATCH 5/6] perf tools: disable JVMTI if no ELF support available David Carrillo-Cisneros
@ 2017-04-12  8:19   ` Jiri Olsa
  2017-04-12 17:07     ` David Carrillo-Cisneros
  2017-04-13 11:40   ` [PATCH 5/6] perf tools: disable " Kim Phillips
  1 sibling, 1 reply; 25+ messages in thread
From: Jiri Olsa @ 2017-04-12  8:19 UTC (permalink / raw)
  To: David Carrillo-Cisneros
  Cc: linux-kernel, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo, Alexander Shishkin, Andi Kleen,
	Simon Que, Wang Nan, Jiri Olsa, He Kuang, Masami Hiramatsu,
	Stephane Eranian, Paul Turner

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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 0/6] perf tool: build and usage hints
  2017-04-12  6:49 [PATCH 0/6] perf tool: build and usage hints David Carrillo-Cisneros
                   ` (6 preceding siblings ...)
  2017-04-12  6:49 ` [PATCH 6/6] Revert "perf tools: Fix include of linux/mman.h" David Carrillo-Cisneros
@ 2017-04-12  8:20 ` Jiri Olsa
  7 siblings, 0 replies; 25+ messages in thread
From: Jiri Olsa @ 2017-04-12  8:20 UTC (permalink / raw)
  To: David Carrillo-Cisneros
  Cc: linux-kernel, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo, Alexander Shishkin, Andi Kleen,
	Simon Que, Wang Nan, Jiri Olsa, He Kuang, Masami Hiramatsu,
	Stephane Eranian, Paul Turner

On Tue, Apr 11, 2017 at 11:49:12PM -0700, David Carrillo-Cisneros wrote:
> 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"

apart from patch 4/6 for series:

Acked-by: Jiri Olsa <jolsa@kernel.org>

thanks,
jirka

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 2/6] tools build: fix feature redefine build flags
  2017-04-12  7:56   ` Jiri Olsa
@ 2017-04-12 16:30     ` David Carrillo-Cisneros
  2017-04-13 14:52       ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 25+ messages in thread
From: David Carrillo-Cisneros @ 2017-04-12 16:30 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: linux-kernel, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo, Alexander Shishkin, Andi Kleen,
	Simon Que, Wang Nan, Jiri Olsa, He Kuang, Masami Hiramatsu,
	Stephane Eranian, Paul Turner

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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 4/6] perf report: hint .perfconfig error when invalid sorting key
  2017-04-12  8:17   ` Jiri Olsa
@ 2017-04-12 16:34     ` David Carrillo-Cisneros
  2017-04-13 14:53       ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 25+ messages in thread
From: David Carrillo-Cisneros @ 2017-04-12 16:34 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: linux-kernel, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo, Alexander Shishkin, Andi Kleen,
	Simon Que, Wang Nan, Jiri Olsa, He Kuang, Masami Hiramatsu,
	Stephane Eranian, Paul Turner

> 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);

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH 5/6] perf tools: disable JVMTI if no ELF support available
  2017-04-12  8:19   ` Jiri Olsa
@ 2017-04-12 17:07     ` David Carrillo-Cisneros
  2017-04-12 17:33       ` Jiri Olsa
  2017-04-17  8:35       ` [tip:perf/core] perf tools: Disable " tip-bot for David Carrillo-Cisneros
  0 siblings, 2 replies; 25+ messages in thread
From: David Carrillo-Cisneros @ 2017-04-12 17:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Andi Kleen, Simon Que, Wang Nan, Jiri Olsa,
	He Kuang, Masami Hiramatsu, Stephane Eranian, Paul Turner,
	David Carrillo-Cisneros

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

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* Re: [PATCH 5/6] perf tools: disable JVMTI if no ELF support available
  2017-04-12 17:07     ` David Carrillo-Cisneros
@ 2017-04-12 17:33       ` Jiri Olsa
  2017-04-13 14:47         ` Arnaldo Carvalho de Melo
  2017-04-17  8:35       ` [tip:perf/core] perf tools: Disable " tip-bot for David Carrillo-Cisneros
  1 sibling, 1 reply; 25+ messages in thread
From: Jiri Olsa @ 2017-04-12 17:33 UTC (permalink / raw)
  To: David Carrillo-Cisneros
  Cc: linux-kernel, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo, Alexander Shishkin, Andi Kleen,
	Simon Que, Wang Nan, Jiri Olsa, He Kuang, Masami Hiramatsu,
	Stephane Eranian, Paul Turner

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
> 

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 5/6] perf tools: disable JVMTI if no ELF support available
  2017-04-12  6:49 ` [PATCH 5/6] perf tools: disable JVMTI if no ELF support available David Carrillo-Cisneros
  2017-04-12  8:19   ` Jiri Olsa
@ 2017-04-13 11:40   ` Kim Phillips
  1 sibling, 0 replies; 25+ messages in thread
From: Kim Phillips @ 2017-04-13 11:40 UTC (permalink / raw)
  To: David Carrillo-Cisneros
  Cc: linux-kernel, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo, Alexander Shishkin, Andi Kleen,
	Simon Que, Wang Nan, Jiri Olsa, He Kuang, Masami Hiramatsu,
	Stephane Eranian, Paul Turner

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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 5/6] perf tools: disable JVMTI if no ELF support available
  2017-04-12 17:33       ` Jiri Olsa
@ 2017-04-13 14:47         ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 25+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-13 14:47 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: David Carrillo-Cisneros, linux-kernel, Peter Zijlstra,
	Ingo Molnar, Alexander Shishkin, Andi Kleen, Simon Que, Wang Nan,
	Jiri Olsa, He Kuang, Kim Phillips, Masami Hiramatsu,
	Stephane Eranian, Paul Turner

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
> > 

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 2/6] tools build: fix feature redefine build flags
  2017-04-12 16:30     ` David Carrillo-Cisneros
@ 2017-04-13 14:52       ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 25+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-13 14:52 UTC (permalink / raw)
  To: David Carrillo-Cisneros
  Cc: Jiri Olsa, linux-kernel, Peter Zijlstra, Ingo Molnar,
	Alexander Shishkin, Andi Kleen, Simon Que, Wang Nan, Jiri Olsa,
	He Kuang, Masami Hiramatsu, Stephane Eranian, Paul Turner

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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 4/6] perf report: hint .perfconfig error when invalid sorting key
  2017-04-12 16:34     ` David Carrillo-Cisneros
@ 2017-04-13 14:53       ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 25+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-13 14:53 UTC (permalink / raw)
  To: David Carrillo-Cisneros
  Cc: Jiri Olsa, linux-kernel, Peter Zijlstra, Ingo Molnar,
	Alexander Shishkin, Andi Kleen, Simon Que, Wang Nan, Jiri Olsa,
	He Kuang, Masami Hiramatsu, Stephane Eranian, Paul Turner

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.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [tip:perf/core] perf tools: Pass PYTHON config to feature detection
  2017-04-12  6:49 ` [PATCH 1/6] perf tools: pass PYTHON config to feature detection David Carrillo-Cisneros
@ 2017-04-17  8:33   ` tip-bot for David Carrillo-Cisneros
  0 siblings, 0 replies; 25+ messages in thread
From: tip-bot for David Carrillo-Cisneros @ 2017-04-17  8:33 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: acme, eranian, alexander.shishkin, tglx, mhiramat, davidcc,
	peterz, ak, hpa, mingo, sque, linux-kernel, pjt, hekuang, jolsa,
	wangnan0

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.)

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [tip:perf/core] perf tools: Disable JVMTI if no ELF support available
  2017-04-12 17:07     ` David Carrillo-Cisneros
  2017-04-12 17:33       ` Jiri Olsa
@ 2017-04-17  8:35       ` tip-bot for David Carrillo-Cisneros
  1 sibling, 0 replies; 25+ messages in thread
From: tip-bot for David Carrillo-Cisneros @ 2017-04-17  8:35 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: mingo, hpa, hekuang, tglx, eranian, ak, mhiramat, jolsa, davidcc,
	kim.phillips, alexander.shishkin, pjt, sque, peterz,
	linux-kernel, wangnan0, acme

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);

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [tip:perf/core] tools build: Fix feature detection redefinion of build flags
  2017-04-12  6:49 ` [PATCH 2/6] tools build: fix feature detection redefinion of build flags David Carrillo-Cisneros
@ 2017-04-17  8:35   ` tip-bot for David Carrillo-Cisneros
  0 siblings, 0 replies; 25+ messages in thread
From: tip-bot for David Carrillo-Cisneros @ 2017-04-17  8:35 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, eranian, mingo, ak, davidcc, pjt, acme, hpa,
	mhiramat, tglx, peterz, hekuang, sque, wangnan0, jolsa,
	alexander.shishkin

Commit-ID:  9961aa665b70e47d6c80141c4a2482266010f246
Gitweb:     http://git.kernel.org/tip/9961aa665b70e47d6c80141c4a2482266010f246
Author:     David Carrillo-Cisneros <davidcc@google.com>
AuthorDate: Tue, 11 Apr 2017 23:49:14 -0700
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 13 Apr 2017 11:48:48 -0300

tools build: Fix feature detection redefinion of build flags

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 c8c188679ccf ("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>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: He Kuang <hekuang@huawei.com>
Cc: Jiri Olsa <jolsa@kernel.org>
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-3-davidcc@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.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 523e587..e35e4e5 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
 
 ###############################

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [tip:perf/core] perf util: Hint missing file when tool tips fail to load
  2017-04-12  6:49 ` [PATCH 3/6] perf util: hint missing file when tool tips fail to load David Carrillo-Cisneros
@ 2017-04-17  8:36   ` tip-bot for David Carrillo-Cisneros
  0 siblings, 0 replies; 25+ messages in thread
From: tip-bot for David Carrillo-Cisneros @ 2017-04-17  8:36 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: mingo, acme, jolsa, eranian, hpa, tglx, davidcc, pjt, peterz,
	linux-kernel, sque, wangnan0, ak, mhiramat, alexander.shishkin,
	hekuang

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;

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [tip:perf/core] Revert "perf tools: Fix include of linux/mman.h"
  2017-04-12  6:49 ` [PATCH 6/6] Revert "perf tools: Fix include of linux/mman.h" David Carrillo-Cisneros
@ 2017-04-17  8:36   ` tip-bot for David Carrillo-Cisneros
  0 siblings, 0 replies; 25+ messages in thread
From: tip-bot for David Carrillo-Cisneros @ 2017-04-17  8:36 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: pjt, sque, hekuang, ak, acme, eranian, jolsa, tglx,
	alexander.shishkin, wangnan0, mhiramat, mingo, davidcc, hpa,
	peterz, linux-kernel

Commit-ID:  16eb81365b70266c17d1141ef9b32c3110b22d17
Gitweb:     http://git.kernel.org/tip/16eb81365b70266c17d1141ef9b32c3110b22d17
Author:     David Carrillo-Cisneros <davidcc@google.com>
AuthorDate: Tue, 11 Apr 2017 23:49:19 -0700
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 13 Apr 2017 11:54:46 -0300

Revert "perf tools: Fix include of linux/mman.h"

In https://lkml.org/lkml/2017/2/2/16 I reported a build error that I
believed was caused by wrong uapi includes. The synthom was fixed by
Arnaldo in:

 commit 2f7db5557994 ("perf tools: Fix include of linux/mman.h")

but I was wrong attributing the problem to the uapi include.

The root cause was that I was using ARCH=x86_64, hence using the wrong
uapi include path. This explains why no one else ran into this build
problem.

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-8-davidcc@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index 8255a26..4d7e65f 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -1,5 +1,5 @@
 #include <linux/types.h>
-#include <linux/mman.h> /* To get things like MAP_HUGETLB even on older libc headers */
+#include <uapi/linux/mman.h> /* To get things like MAP_HUGETLB even on older libc headers */
 #include <api/fs/fs.h>
 #include "event.h"
 #include "debug.h"

^ permalink raw reply related	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2017-04-17  8:43 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-12  6:49 [PATCH 0/6] perf tool: build and usage hints David Carrillo-Cisneros
2017-04-12  6:49 ` [PATCH 1/6] perf tools: pass PYTHON config to feature detection David Carrillo-Cisneros
2017-04-17  8:33   ` [tip:perf/core] perf tools: Pass " tip-bot for David Carrillo-Cisneros
2017-04-12  6:49 ` [PATCH 2/6] tools build: fix feature detection redefinion of build flags David Carrillo-Cisneros
2017-04-17  8:35   ` [tip:perf/core] tools build: Fix " tip-bot for David Carrillo-Cisneros
2017-04-12  6:49 ` [PATCH 2/6] tools build: fix feature redefine " David Carrillo-Cisneros
2017-04-12  7:56   ` Jiri Olsa
2017-04-12 16:30     ` David Carrillo-Cisneros
2017-04-13 14:52       ` Arnaldo Carvalho de Melo
2017-04-12  6:49 ` [PATCH 3/6] perf util: hint missing file when tool tips fail to load David Carrillo-Cisneros
2017-04-17  8:36   ` [tip:perf/core] perf util: Hint " tip-bot for David Carrillo-Cisneros
2017-04-12  6:49 ` [PATCH 4/6] perf report: hint .perfconfig error when invalid sorting key David Carrillo-Cisneros
2017-04-12  8:17   ` Jiri Olsa
2017-04-12 16:34     ` David Carrillo-Cisneros
2017-04-13 14:53       ` Arnaldo Carvalho de Melo
2017-04-12  6:49 ` [PATCH 5/6] perf tools: disable JVMTI if no ELF support available David Carrillo-Cisneros
2017-04-12  8:19   ` Jiri Olsa
2017-04-12 17:07     ` David Carrillo-Cisneros
2017-04-12 17:33       ` Jiri Olsa
2017-04-13 14:47         ` Arnaldo Carvalho de Melo
2017-04-17  8:35       ` [tip:perf/core] perf tools: Disable " tip-bot for David Carrillo-Cisneros
2017-04-13 11:40   ` [PATCH 5/6] perf tools: disable " Kim Phillips
2017-04-12  6:49 ` [PATCH 6/6] Revert "perf tools: Fix include of linux/mman.h" David Carrillo-Cisneros
2017-04-17  8:36   ` [tip:perf/core] " tip-bot for David Carrillo-Cisneros
2017-04-12  8:20 ` [PATCH 0/6] perf tool: build and usage hints Jiri Olsa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).