perf annotate: Fix build with NO_NEWT=1
PATCH 1/2 perf annotate: Fix build with NO_NEWT=1
Commit 18c9e5c "Make it to be able to skip unannotatable symbols" broke the build with NO_NEWT=1:
CC builtin-annotate.obuiltin-annotate.c: In function 'hists__find_annotations':
builtin-annotate.c:161:4: error: duplicate case value builtin-annotate.c:154:4: error: previously used here
make: *** [builtin-annotate.o] Error 1
This is because without NEWT support K_LEFT is #defined to -1 in utils/hist.h
Fix it by shifting the K_LEFT/K_RIGHT #defines out of the likely range of error values.
--- tools/perf/util/hist.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/perf/util/hist.h +2 -2
@@ -208,8 +208,8 @@ static inline int script_browse(const char *script_opt __maybe_unused) return 0; } -#define K_LEFT -1 -#define K_RIGHT -2 +#define K_LEFT -1000 +#define K_RIGHT -2000#endif #ifdef GTK2_SUPPORT
Signature · 1 line
1.7.10.4
PATCH 2/2 perf report: Fix build with NO_NEWT=1
Commit ad0de09 "Enable the runtime switching of perf data file" broke the build with NO_NEWT=1:
CC builtin-report.obuiltin-report.c: In function '__cmd_report':
builtin-report.c:479:15: error: 'K_SWITCH_INPUT_DATA' undeclared (first use in this function) builtin-report.c:479:15: note: each undeclared identifier is reported only once for each function it appears in builtin-report.c: In function 'cmd_report':
builtin-report.c:823:13: error: 'K_SWITCH_INPUT_DATA' undeclared (first use in this function)
make: *** [builtin-report.o] Error 1
Fix it by adding a dummy definition of K_SWITCH_INPUT_DATA.
--- tools/perf/util/hist.h | 1 + 1 file changed, 1 insertion(+)
tools/perf/util/hist.h +1 -0
@@ -210,6 +210,7 @@ static inline int script_browse(const char *script_opt __maybe_unused)#define K_LEFT -1000#define K_RIGHT -2000 +#define K_SWITCH_INPUT_DATA -3000#endif #ifdef GTK2_SUPPORT
Signature · 1 line
1.7.10.4
Re: [PATCH 2/2] perf report: Fix build with NO_NEWT=1
Quoted 23 lines · Michael Ellerman
Commit ad0de09 "Enable the runtime switching of perf data file" broke the build with NO_NEWT=1:
CC builtin-report.o
builtin-report.c: In function '__cmd_report':
builtin-report.c:479:15: error: 'K_SWITCH_INPUT_DATA' undeclared (first use in this function) builtin-report.c:479:15: note: each undeclared identifier is reported only once for each function it appears inbuiltin-report.c: In function 'cmd_report':
builtin-report.c:823:13: error: 'K_SWITCH_INPUT_DATA' undeclared (first use in this function)
make: *** [builtin-report.o] Error 1Fix it by adding a dummy definition of
K_SWITCH_INPUT_DATA.Signed-off-by Michael Ellerman <[email protected]>--- tools/perf/util/hist.h | 1 + 1 file changed, 1 insertion(+)tools/perf/util/hist.h +0
-0
tools/perf/util/hist.h static inline int script_browse(const char *script_opt __maybe_unused) · line 213
Quoted 4 lines
tools/perf/util/hist.h +1
-0@@ -210,6 +210,7 @@ static inline int script_browse(const char *script_opt __maybe_unused)#define K_LEFT -1000#define K_RIGHT -2000 +#define K_SWITCH_INPUT_DATA -3000
Both patches look good to me, thanks for the fix. But can we use a better value? -1000, -2000 looks a little awkward.
- Feng
Re: [PATCH 2/2] perf report: Fix build with NO_NEWT=1
Quoted 25 lines · Feng Tang
Quoted 24 lines · Michael Ellerman
Commit ad0de09 "Enable the runtime switching of perf data file" broke the build with NO_NEWT=1:
CC builtin-report.o
builtin-report.c: In function '__cmd_report':
builtin-report.c:479:15: error: 'K_SWITCH_INPUT_DATA' undeclared (first use in this function) builtin-report.c:479:15: note: each undeclared identifier is reported only once for each function it appears inbuiltin-report.c: In function 'cmd_report':
builtin-report.c:823:13: error: 'K_SWITCH_INPUT_DATA' undeclared (first use in this function)
make: *** [builtin-report.o] Error 1Fix it by adding a dummy definition of
K_SWITCH_INPUT_DATA.Signed-off-by Michael Ellerman <[email protected]>--- tools/perf/util/hist.h | 1 + 1 file changed, 1 insertion(+)tools/perf/util/hist.h +0
-0@@ -210,6 +210,7 @@ static inline int script_browse(const char *script_opt __maybe_unused)
Quoted 6 lines
tools/perf/util/hist.h static inline int script_browse(const char *script_opt __maybe_unused) · line 213
Quoted 3 lines
tools/perf/util/hist.h +1
-0#define K_LEFT -1000#define K_RIGHT -2000 +#define K_SWITCH_INPUT_DATA -3000Both patches look good to me, thanks for the fix. But can we use a better value? -1000, -2000 looks a little awkward.
Better how? I'm not bothered what the values are, I was just trying to prevent the same bug happening again by shifting the values out of the -ERRNO range - which goes to ~130.
cheers
tip-bot for Michael Ellerman
merge bot[tip:perf/urgent] perf report: Fix build with NO_NEWT=1
In reply to Michael Ellermanperf report: Fix build with NO_NEWT=1
Commit-ID: 5f7439e07822942f32b9e0a66f4a3cc9c3e29e67 Gitweb: http://git.kernel.org/tip/5f7439e07822942f32b9e0a66f4a3cc9c3e29e67 Author: Michael Ellerman <[email protected]> AuthorDate: Tue, 26 Feb 2013 16:02:03 +1100 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Wed, 13 Mar 2013 16:55:17 -0300
perf report: Fix build with NO_NEWT=1
Commit ad0de09 "Enable the runtime switching of perf data file" broke the build with NO_NEWT=1:
CC builtin-report.obuiltin-report.c: In function '__cmd_report':
builtin-report.c:479:15: error: 'K_SWITCH_INPUT_DATA' undeclared (first use in this function) builtin-report.c:479:15: note: each undeclared identifier is reported only once for each function it appears in builtin-report.c: In function 'cmd_report':
builtin-report.c:823:13: error: 'K_SWITCH_INPUT_DATA' undeclared (first use in this function)
make: *** [builtin-report.o] Error 1
Fix it by adding a dummy definition of K_SWITCH_INPUT_DATA.
--- tools/perf/util/hist.h | 1 + 1 file changed, 1 insertion(+)
tools/perf/util/hist.h +1 -0
@@ -210,6 +210,7 @@ static inline int script_browse(const char *script_opt __maybe_unused)#define K_LEFT -1000#define K_RIGHT -2000 +#define K_SWITCH_INPUT_DATA -3000#endif #ifdef GTK2_SUPPORT
Namhyung Kim
maintainerHi Michael,
Quoted 9 lines · Michael Ellerman
Commit 18c9e5c "Make it to be able to skip unannotatable symbols" broke the build with NO_NEWT=1:
CC builtin-annotate.o
builtin-annotate.c: In function 'hists__find_annotations':
builtin-annotate.c:161:4: error: duplicate case value builtin-annotate.c:154:4: error: previously used here
make: *** [builtin-annotate.o] Error 1
Quoted 5 lines
This is because without NEWT support
K_LEFTis #defined to -1 inutils/hist.hFix it by shifting the K_LEFT/K_RIGHT #defines out of the likely range of error values.
Argh, didn't check NO_NEWT build on this, sorry.
The hist_entry__tui_annotate() - hence, symbol__tui_annotate() - returns either key code or error code. This is not good IMHO but not sure it's worth refactoring. Maybe we can move the error check to under default case so that possible future error checks to be done?
Thanks,
Namhyung
Quoted 18 lines · 在 2013-02-26二的 18:02 +0900,Namhyung Kim写道:
Hi Michael,
Quoted 9 lines · Michael Ellerman
Commit 18c9e5c "Make it to be able to skip unannotatable symbols" broke the build with NO_NEWT=1:
CC builtin-annotate.o
builtin-annotate.c: In function 'hists__find_annotations':
builtin-annotate.c:161:4: error: duplicate case value builtin-annotate.c:154:4: error: previously used here
make: *** [builtin-annotate.o] Error 1Quoted 5 lines
This is because without NEWT support
K_LEFTis #defined to -1 inutils/hist.hFix it by shifting the K_LEFT/K_RIGHT #defines out of the likely range of error values.
Quoted 6 lines
Argh, didn't check
NO_NEWTbuild on this, sorry.The
hist_entry__tui_annotate()- hence,symbol__tui_annotate()- returns either key code or error code. This is not good IMHO but not sure it's worth refactoring. Maybe we can move the error check to under default case so that possible future error checks to be done?
or can we skip gui-code-snippet when there's no gui library? anyway, for present fix-up, we can just temporarily change K_LEFT value like Michael's or my patch, I think.
Quoted 8 lines
Thanks,
Namhyung
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 21 lines · li guang
Quoted 20 lines · 在 2013-02-26二的 18:02 +0900,Namhyung Kim写道:
Hi Michael,
Quoted 9 lines · Michael Ellerman
Commit 18c9e5c "Make it to be able to skip unannotatable symbols" broke the build with NO_NEWT=1:
CC builtin-annotate.o
builtin-annotate.c: In function 'hists__find_annotations':
builtin-annotate.c:161:4: error: duplicate case value builtin-annotate.c:154:4: error: previously used here
make: *** [builtin-annotate.o] Error 1Quoted 5 lines
This is because without NEWT support
K_LEFTis #defined to -1 inutils/hist.hFix it by shifting the K_LEFT/K_RIGHT #defines out of the likely range of error values.
Argh, didn't check
NO_NEWTbuild on this, sorry.
Quoted 8 lines
Quoted 4 lines
The
hist_entry__tui_annotate()- hence,symbol__tui_annotate()- returns either key code or error code. This is not good IMHO but not sure it's worth refactoring. Maybe we can move the error check to under default case so that possible future error checks to be done?or can we skip gui-code-snippet when there's no gui library? anyway, for present fix-up, we can just temporarily change
K_LEFTvalue like Michael's or my patch, I think.
Sorry I didn't see your patch, but yes I agree, either is fine and fixes the build for now.
cheers
Quoted 35 lines · 在 2013-02-27三的 12:22 +1100,Michael Ellerman写道:
Quoted 21 lines · li guang
Quoted 20 lines · 在 2013-02-26二的 18:02 +0900,Namhyung Kim写道:
Hi Michael,
Quoted 9 lines · Michael Ellerman
Commit 18c9e5c "Make it to be able to skip unannotatable symbols" broke the build with NO_NEWT=1:
CC builtin-annotate.o
builtin-annotate.c: In function 'hists__find_annotations':
builtin-annotate.c:161:4: error: duplicate case value builtin-annotate.c:154:4: error: previously used here
make: *** [builtin-annotate.o] Error 1Quoted 5 lines
This is because without NEWT support
K_LEFTis #defined to -1 inutils/hist.hFix it by shifting the K_LEFT/K_RIGHT #defines out of the likely range of error values.
Argh, didn't check
NO_NEWTbuild on this, sorry.Quoted 8 lines
Quoted 4 lines
The
hist_entry__tui_annotate()- hence,symbol__tui_annotate()- returns either key code or error code. This is not good IMHO but not sure it's worth refactoring. Maybe we can move the error check to under default case so that possible future error checks to be done?or can we skip gui-code-snippet when there's no gui library? anyway, for present fix-up, we can just temporarily change
K_LEFTvalue like Michael's or my patch, I think.Sorry I didn't see your patch, but yes I agree, either is fine and fixes the build for now.
cheers
Quoted 27 lines · 在 2013-02-27三的 12:22 +1100,Michael Ellerman写道:
Quoted 26 lines · li guang
Quoted 24 lines · 在 2013-02-26二的 18:02 +0900,Namhyung Kim写道:
Hi Michael,
Quoted 9 lines · Michael Ellerman
Commit 18c9e5c "Make it to be able to skip unannotatable symbols" broke the build with NO_NEWT=1:
CC builtin-annotate.o
builtin-annotate.c: In function 'hists__find_annotations':
builtin-annotate.c:161:4: error: duplicate case value builtin-annotate.c:154:4: error: previously used here
make: *** [builtin-annotate.o] Error 1Quoted 5 lines
This is because without NEWT support
K_LEFTis #defined to -1 inutils/hist.hFix it by shifting the K_LEFT/K_RIGHT #defines out of the likely range of error values.
Argh, didn't check
NO_NEWTbuild on this, sorry.The
hist_entry__tui_annotate()- hence,symbol__tui_annotate()- returns either key code or error code. This is not good IMHO but not sure it's worth refactoring. Maybe we can move the error check to under default case so that possible future error checks to be done?
Quoted 8 lines
Quoted 3 lines
or can we skip gui-code-snippet when there's no gui library? anyway, for present fix-up, we can just temporarily change
K_LEFTvalue like Michael's or my patch, I think.Sorry I didn't see your patch, but yes I agree, either is fine and fixes the build for now.
cheers
Namhyung Kim
maintainerHi li guang,
Quoted 21 lines · li guang
Quoted 20 lines · 在 2013-02-26二的 18:02 +0900,Namhyung Kim写道:
Hi Michael,
Quoted 9 lines · Michael Ellerman
Commit 18c9e5c "Make it to be able to skip unannotatable symbols" broke the build with NO_NEWT=1:
CC builtin-annotate.o
builtin-annotate.c: In function 'hists__find_annotations':
builtin-annotate.c:161:4: error: duplicate case value builtin-annotate.c:154:4: error: previously used here
make: *** [builtin-annotate.o] Error 1Quoted 5 lines
This is because without NEWT support
K_LEFTis #defined to -1 inutils/hist.hFix it by shifting the K_LEFT/K_RIGHT #defines out of the likely range of error values.
Argh, didn't check
NO_NEWTbuild on this, sorry.
Quoted 8 lines
Quoted 4 lines
The
hist_entry__tui_annotate()- hence,symbol__tui_annotate()- returns either key code or error code. This is not good IMHO but not sure it's worth refactoring. Maybe we can move the error check to under default case so that possible future error checks to be done?or can we skip gui-code-snippet when there's no gui library? anyway, for present fix-up, we can just temporarily change
K_LEFTvalue like Michael's or my patch, I think.
That part of code won't be run on NO_NEWT build since the 'use_browser' would be value of 0. It's just a compilation problem.
Anyway, I have no objection from the both of patches for now.
Thanks,
Namhyung
tip-bot for Michael Ellerman
merge botperf annotate: Fix build with NO_NEWT=1
Commit-ID: 1e825efb571a87d039cb3fe7ca833a25f11c7cb9 Gitweb: http://git.kernel.org/tip/1e825efb571a87d039cb3fe7ca833a25f11c7cb9 Author: Michael Ellerman <[email protected]> AuthorDate: Tue, 26 Feb 2013 16:02:02 +1100 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Wed, 13 Mar 2013 16:54:49 -0300
perf annotate: Fix build with NO_NEWT=1
Commit 18c9e5c "Make it to be able to skip unannotatable symbols" broke the build with NO_NEWT=1:
CC builtin-annotate.obuiltin-annotate.c: In function 'hists__find_annotations':
builtin-annotate.c:161:4: error: duplicate case value builtin-annotate.c:154:4: error: previously used here
make: *** [builtin-annotate.o] Error 1
This is because without NEWT support K_LEFT is #defined to -1 in utils/hist.h
Fix it by shifting the K_LEFT/K_RIGHT #defines out of the likely range of error values.
--- tools/perf/util/hist.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/perf/util/hist.h +2 -2
@@ -208,8 +208,8 @@ static inline int script_browse(const char *script_opt __maybe_unused) return 0; } -#define K_LEFT -1 -#define K_RIGHT -2 +#define K_LEFT -1000 +#define K_RIGHT -2000#endif #ifdef GTK2_SUPPORT