aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-12-03 14:11:37 -0500
committerIngo Molnar <mingo@elte.hu>2009-12-03 14:11:38 -0500
commitd103d01e4b19f185d3c85f77402b605534c32e89 (patch)
treede78754f58524b49abf3103f2bc2e2be359eda2f /arch
parent26fb20d008d841268545c25bb183f21ed16db891 (diff)
parent6f5f67267dc4faecd9cba63894de92ca92a608b8 (diff)
Merge branch 'perf/probes' into perf/core
Merge reason: add these fixes to 'perf probe'. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/tools/Makefile15
-rw-r--r--arch/x86/tools/chkobjdump.awk23
2 files changed, 35 insertions, 3 deletions
diff --git a/arch/x86/tools/Makefile b/arch/x86/tools/Makefile
index 4688f90ce5a..f8208267733 100644
--- a/arch/x86/tools/Makefile
+++ b/arch/x86/tools/Makefile
@@ -1,13 +1,22 @@
1PHONY += posttest 1PHONY += posttest
2 2
3ifeq ($(KBUILD_VERBOSE),1) 3ifeq ($(KBUILD_VERBOSE),1)
4 postest_verbose = -v 4 posttest_verbose = -v
5else 5else
6 postest_verbose = 6 posttest_verbose =
7endif 7endif
8 8
9ifeq ($(CONFIG_64BIT),y)
10 posttest_64bit = -y
11else
12 posttest_64bit = -n
13endif
14
15distill_awk = $(srctree)/arch/x86/tools/distill.awk
16chkobjdump = $(srctree)/arch/x86/tools/chkobjdump.awk
17
9quiet_cmd_posttest = TEST $@ 18quiet_cmd_posttest = TEST $@
10 cmd_posttest = $(OBJDUMP) -d -j .text $(objtree)/vmlinux | awk -f $(srctree)/arch/x86/tools/distill.awk | $(obj)/test_get_len -$(CONFIG_64BIT) $(posttest_verbose) 19 cmd_posttest = ($(OBJDUMP) -v | $(AWK) -f $(chkobjdump)) || $(OBJDUMP) -d -j .text $(objtree)/vmlinux | $(AWK) -f $(distill_awk) | $(obj)/test_get_len $(posttest_64bit) $(posttest_verbose)
11 20
12posttest: $(obj)/test_get_len vmlinux 21posttest: $(obj)/test_get_len vmlinux
13 $(call cmd,posttest) 22 $(call cmd,posttest)
diff --git a/arch/x86/tools/chkobjdump.awk b/arch/x86/tools/chkobjdump.awk
new file mode 100644
index 00000000000..0d13cd9fdcf
--- /dev/null
+++ b/arch/x86/tools/chkobjdump.awk
@@ -0,0 +1,23 @@
1# GNU objdump version checker
2#
3# Usage:
4# objdump -v | awk -f chkobjdump.awk
5BEGIN {
6 # objdump version 2.19 or later is OK for the test.
7 od_ver = 2;
8 od_sver = 19;
9}
10
11/^GNU/ {
12 split($4, ver, ".");
13 if (ver[1] > od_ver ||
14 (ver[1] == od_ver && ver[2] >= od_sver)) {
15 exit 1;
16 } else {
17 printf("Warning: objdump version %s is older than %d.%d\n",
18 $4, od_ver, od_sver);
19 print("Warning: Skipping posttest.");
20 # Logic is inverted, because we just skip test without error.
21 exit 0;
22 }
23}