Skip to contentSkip to conversation

perf tools: Fix hist_entry__tui_annotate declaration for !HAVE_SLANG_SUPPORT

PATCH In review Jiri Olsa 3 participants 4 messages Jun 1, 2018 perf events

lore
Share & tools
lore

Jiri Olsa

author reviewer
#0 lore raw

PATCH 1/1 perf tools: Fix hist_entry__tui_annotate declaration for !HAVE_SLANG_SUPPORT

The compilation is broken if there's no slang support:

builtin-annotate.c: In function ‘hists__find_annotations’:
builtin-annotate.c:344:10: error: too many arguments to function ‘hist_entry__tui_annotate’

      key = hist_entry__tui_annotate(he, evsel, NULL, &ann->opts);

Adding the missing argument to hist_entry__tui_annotate function.

Fixes 464fb4fd6af7 ("perf hists browser: Pass annotation_options from tool to browser")
---
 tools/perf/util/hist.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/perf/util/hist.h +2 -1
index 256292b18bb8..9b1a68a685d4 100644
@@ -446,7 +446,8 @@ static inline int map_symbol__tui_annotate(struct map_symbol *ms __maybe_unused,
 
 static inline int hist_entry__tui_annotate(struct hist_entry *he __maybe_unused,
 					   struct perf_evsel *evsel __maybe_unused,
-					   struct hist_browser_timer *hbt __maybe_unused)
+					   struct hist_browser_timer *hbt __maybe_unused,
+					   struct annotation_options *annotation_opts)
 {
 	return 0;
 }
Signature · 1 line
2.13.6
#1 lore raw

Em Fri, Jun 01, 2018 at 11:56:48AM +0200, Jiri Olsa escreveu:

Quoted 7 lines

The compilation is broken if there's no slang support:

builtin-annotate.c: In function ‘hists__find_annotations’:
builtin-annotate.c:344:10: error: too many arguments to function ‘hist_entry__tui_annotate’

      key = hist_entry__tui_annotate(he, evsel, NULL, &ann->opts);

Adding the missing argument to hist_entry__tui_annotate function.

Thanks, I think I have this fixed locally.

- Arnaldo

Quoted 23 lines
Fixes 464fb4fd6af7 ("perf hists browser: Pass annotation_options from tool to browser")
---
 tools/perf/util/hist.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/perf/util/hist.h +2 -1
index 256292b18bb8..9b1a68a685d4 100644
@@ -446,7 +446,8 @@ static inline int map_symbol__tui_annotate(struct map_symbol *ms __maybe_unused,
 
 static inline int hist_entry__tui_annotate(struct hist_entry *he __maybe_unused,
 					   struct perf_evsel *evsel __maybe_unused,
-					   struct hist_browser_timer *hbt __maybe_unused)
+					   struct hist_browser_timer *hbt __maybe_unused,
+					   struct annotation_options *annotation_opts)
 {
 	return 0;
 }
Signature · 1 line
2.13.6
#2 lore raw
Quoted 26 lines · Arnaldo Carvalho de Melo

Em Fri, Jun 01, 2018 at 11:56:48AM +0200, Jiri Olsa escreveu:

Quoted 7 lines

The compilation is broken if there's no slang support:

builtin-annotate.c: In function ‘hists__find_annotations’:
builtin-annotate.c:344:10: error: too many arguments to function ‘hist_entry__tui_annotate’

      key = hist_entry__tui_annotate(he, evsel, NULL, &ann->opts);

Adding the missing argument to hist_entry__tui_annotate function.

Thanks, I think I have this fixed locally.

- Arnaldo

Quoted 13 lines
Fixes 464fb4fd6af7 ("perf hists browser: Pass annotation_options from tool to browser")
---
 tools/perf/util/hist.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/perf/util/hist.h +0 -0
index 256292b18bb8..9b1a68a685d4 100644
@@ -446,7 +446,8 @@ static inline int map_symbol__tui_annotate(struct map_symbol *ms __maybe_unused,
 
Quoted 5 lines

tools/perf/util/hist.h static inline int map_symbol__tui_annotate(struct map_symbol *ms __maybe_unused, · line 450

Quoted 5 lines
tools/perf/util/hist.h +2 -1
 static inline int hist_entry__tui_annotate(struct hist_entry *he __maybe_unused,
 					   struct perf_evsel *evsel __maybe_unused,
-					   struct hist_browser_timer *hbt __maybe_unused)
+					   struct hist_browser_timer *hbt __maybe_unused,
+					   struct annotation_options *annotation_opts)

good, because I sent you wrong one.. without __maybe_unused ;-) sry

jirka

#3 lore raw

Em Fri, Jun 01, 2018 at 05:21:55PM +0200, Jiri Olsa escreveu:

Quoted 9 lines · Arnaldo Carvalho de Melo
Quoted 8 lines

Em Fri, Jun 01, 2018 at 11:56:48AM +0200, Jiri Olsa escreveu:

Quoted 1 line

Adding the missing argument to hist_entry__tui_annotate function.

Thanks, I think I have this fixed locally.

Quoted 3 lines

+++ b/tools/perf/util/hist.h

(quoted diff) +0 -0
@@ -446,7 +446,8 @@ static inline int map_symbol__tui_annotate(struct map_symbol *ms __maybe_unused,
 
Quoted 7 lines
Quoted 5 lines

tools/perf/util/hist.h static inline int map_symbol__tui_annotate(struct map_symbol *ms __maybe_unused, · line 450

Quoted 5 lines
tools/perf/util/hist.h +2 -1
 static inline int hist_entry__tui_annotate(struct hist_entry *he __maybe_unused,
 					   struct perf_evsel *evsel __maybe_unused,
-					   struct hist_browser_timer *hbt __maybe_unused)
+					   struct hist_browser_timer *hbt __maybe_unused,
+					   struct annotation_options *annotation_opts)

good, because I sent you wrong one.. without __maybe_unused ;-) sry

Erm, I hadn't, so I just fixed this and force pushed perf/core

https://git.kernel.org/acme/c/2b90f5c0c0a6

- Arnaldo