Skip to contentSkip to conversation

perf/ui/gtk: Add missing zalloc object

PATCH Applied Jiri Olsa 3 participants 6 messages Jan 13, 2020 – Jan 20, 2020 perf events

lore
Share & tools
lore

Jiri Olsa

author reviewer
#0 lore raw

PATCH 1/2 perf/ui/gtk: Add missing zalloc object

When we moved zalloc.o to the library we missed gtk library which needs it compiled in, otherwise the missing __zfree symbol will cause the library to fail to load.

Adding the zalloc object to the gtk library build.

Fixes 7f7c536f23e6 ("tools lib: Adopt zalloc()/zfree() from tools/perf")
---
 tools/perf/ui/gtk/Build | 5 +++++
 1 file changed, 5 insertions(+)
tools/perf/ui/gtk/Build +5 -0
index ec22e899a224..9b5d5cbb7af7 100644
@@ -7,3 +7,8 @@ gtk-y += util.o
 gtk-y += helpline.o
 gtk-y += progress.o
 gtk-y += annotate.o
+gtk-y += zalloc.o
+
+$(OUTPUT)ui/gtk/zalloc.o: ../lib/zalloc.c FORCE
+	$(call rule_mkdir)
+	$(call if_changed_dep,cc_o_c)
Signature · 1 line
2.24.1
author reviewer
#1 lore raw

PATCH 2/2 perf/ui/gtk: Fix gtk2 build

Ravi Bangoria reported issue when detecting gtk2 on Fedora 31, where some types got deprecated:

  /usr/include/gtk-2.0/gtk/gtktypeutils.h:236:1: error: ‘GTypeDebugFlags’ is deprecated [-Werror=deprecated-declarations]
    236 | void            gtk_type_init   (GTypeDebugFlags    debug_flags);

Fixing this for perf by allowing the compile to pass with deprecated symbols via -Wno-deprecated-declarations.

---
 tools/build/feature/Makefile | 2 +-
 tools/perf/ui/gtk/Build      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
tools/build/feature/Makefile +1 -1
index f30a89046aa3..7ac0d8088565 100644
@@ -197,7 +197,7 @@ $(OUTPUT)test-libcrypto.bin:
 	$(BUILD) -lcrypto
 
 $(OUTPUT)test-gtk2.bin:
-	$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
+	$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) -Wno-deprecated-declarations
 
 $(OUTPUT)test-gtk2-infobar.bin:
 	$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
tools/perf/ui/gtk/Build +1 -1
index 9b5d5cbb7af7..eef708c502f4 100644
@@ -1,4 +1,4 @@
-CFLAGS_gtk += -fPIC $(GTK_CFLAGS)
+CFLAGS_gtk += -fPIC $(GTK_CFLAGS) -Wno-deprecated-declarations
 
 gtk-y += browser.o
 gtk-y += hists.o
Signature · 1 line
2.24.1
#2 lore raw

Re: [PATCH 2/2] perf/ui/gtk: Fix gtk2 build

Em Mon, Jan 13, 2020 at 11:43:58AM +0100, Jiri Olsa escreveu:

Quoted 8 lines

Ravi Bangoria reported issue when detecting gtk2 on Fedora 31, where some types got deprecated:

  /usr/include/gtk-2.0/gtk/gtktypeutils.h:236:1: error: ‘GTypeDebugFlags’ is deprecated [-Werror=deprecated-declarations]
    236 | void            gtk_type_init   (GTypeDebugFlags    debug_flags);

Fixing this for perf by allowing the compile to pass with deprecated symbols via -Wno-deprecated-declarations.

Thanks, applied.

- Arnaldo

Quoted 35 lines
---
 tools/build/feature/Makefile | 2 +-
 tools/perf/ui/gtk/Build      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
tools/build/feature/Makefile +1 -1
index f30a89046aa3..7ac0d8088565 100644
@@ -197,7 +197,7 @@ $(OUTPUT)test-libcrypto.bin:
 	$(BUILD) -lcrypto
 
 $(OUTPUT)test-gtk2.bin:
-	$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
+	$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) -Wno-deprecated-declarations
 
 $(OUTPUT)test-gtk2-infobar.bin:
 	$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
tools/perf/ui/gtk/Build +1 -1
index 9b5d5cbb7af7..eef708c502f4 100644
@@ -1,4 +1,4 @@
-CFLAGS_gtk += -fPIC $(GTK_CFLAGS)
+CFLAGS_gtk += -fPIC $(GTK_CFLAGS) -Wno-deprecated-declarations
 
 gtk-y += browser.o
 gtk-y += hists.o
Signature · 1 line
2.24.1
Signature · 1 line
- Arnaldo
merge bot Applied
#3 lore raw

[tip: perf/core] perf/ui/gtk: Fix gtk2 build

In reply to Jiri Olsa
The following commit has been merged into the perf/core branch of tip:

The following commit has been merged into the perf/core branch of tip:

Commit-ID:     93e843f95f095aeb533ab67ac4718f848d38dfa0
Gitweb:        https://git.kernel.org/tip/93e843f95f095aeb533ab67ac4718f848d38dfa0
Author:        Jiri Olsa <[email protected]>
AuthorDate:    Mon, 13 Jan 2020 11:43:58 +01:00
Committer:     Arnaldo Carvalho de Melo <[email protected]>
CommitterDate: Tue, 14 Jan 2020 12:40:33 -03:00

perf/ui/gtk: Fix gtk2 build

Ravi Bangoria reported an issue when doing the gtk2 feature detection on Fedora 31, where some types got deprecated:

  /usr/include/gtk-2.0/gtk/gtktypeutils.h:236:1: error: ‘GTypeDebugFlags’ is deprecated [-Werror=deprecated-declarations]
    236 | void            gtk_type_init   (GTypeDebugFlags    debug_flags);

Fix this for perf by allowing the compile to pass with deprecated symbols via the -Wno-deprecated-declarations compiler directive.

---
 tools/build/feature/Makefile | 2 +-
 tools/perf/ui/gtk/Build      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
tools/build/feature/Makefile +1 -1
index f30a890..7ac0d80 100644
@@ -197,7 +197,7 @@ $(OUTPUT)test-libcrypto.bin:
 	$(BUILD) -lcrypto
 
 $(OUTPUT)test-gtk2.bin:
-	$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
+	$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) -Wno-deprecated-declarations
 
 $(OUTPUT)test-gtk2-infobar.bin:
 	$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
tools/perf/ui/gtk/Build +1 -1
index 9b5d5cb..eef708c 100644
@@ -1,4 +1,4 @@
-CFLAGS_gtk += -fPIC $(GTK_CFLAGS)
+CFLAGS_gtk += -fPIC $(GTK_CFLAGS) -Wno-deprecated-declarations
 
 gtk-y += browser.o
 gtk-y += hists.o
#4 lore raw
In reply to Jiri Olsa

Em Mon, Jan 13, 2020 at 11:43:57AM +0100, Jiri Olsa escreveu:

Quoted 5 lines

When we moved zalloc.o to the library we missed gtk library which needs it compiled in, otherwise the missing __zfree symbol will cause the library to fail to load.

Adding the zalloc object to the gtk library build.

Thanks, applied.

- Arnaldo

Quoted 23 lines
Fixes 7f7c536f23e6 ("tools lib: Adopt zalloc()/zfree() from tools/perf")
---
 tools/perf/ui/gtk/Build | 5 +++++
 1 file changed, 5 insertions(+)
tools/perf/ui/gtk/Build +5 -0
index ec22e899a224..9b5d5cbb7af7 100644
@@ -7,3 +7,8 @@ gtk-y += util.o
 gtk-y += helpline.o
 gtk-y += progress.o
 gtk-y += annotate.o
+gtk-y += zalloc.o
+
+$(OUTPUT)ui/gtk/zalloc.o: ../lib/zalloc.c FORCE
+	$(call rule_mkdir)
+	$(call if_changed_dep,cc_o_c)
Signature · 1 line
2.24.1
Signature · 1 line
- Arnaldo
merge bot Applied
#5 lore raw

[tip: perf/core] perf ui gtk: Add missing zalloc object

In reply to Jiri Olsa
The following commit has been merged into the perf/core branch of tip:

The following commit has been merged into the perf/core branch of tip:

Commit-ID:     604e2139a1026793b8c2172bd92c7e9d039a5cf0
Gitweb:        https://git.kernel.org/tip/604e2139a1026793b8c2172bd92c7e9d039a5cf0
Author:        Jiri Olsa <[email protected]>
AuthorDate:    Mon, 13 Jan 2020 11:43:57 +01:00
Committer:     Arnaldo Carvalho de Melo <[email protected]>
CommitterDate: Tue, 14 Jan 2020 12:24:16 -03:00

perf ui gtk: Add missing zalloc object

When we moved zalloc.o to the library we missed gtk library which needs it compiled in, otherwise the missing __zfree symbol will cause the library to fail to load.

Adding the zalloc object to the gtk library build.

Fixes 7f7c536f23e6 ("tools lib: Adopt zalloc()/zfree() from tools/perf")
Cc Alexander Shishkin <[email protected]>
Cc Jelle van der Waa <[email protected]>
Cc Michael Petlan <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Peter Zijlstra <[email protected]>
---
 tools/perf/ui/gtk/Build | 5 +++++
 1 file changed, 5 insertions(+)
tools/perf/ui/gtk/Build +5 -0
index ec22e89..9b5d5cb 100644
@@ -7,3 +7,8 @@ gtk-y += util.o
 gtk-y += helpline.o
 gtk-y += progress.o
 gtk-y += annotate.o
+gtk-y += zalloc.o
+
+$(OUTPUT)ui/gtk/zalloc.o: ../lib/zalloc.c FORCE
+	$(call rule_mkdir)
+	$(call if_changed_dep,cc_o_c)