diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-12-03 14:11:37 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-12-03 14:11:38 -0500 |
commit | d103d01e4b19f185d3c85f77402b605534c32e89 (patch) | |
tree | de78754f58524b49abf3103f2bc2e2be359eda2f /arch/x86/tools | |
parent | 26fb20d008d841268545c25bb183f21ed16db891 (diff) | |
parent | 6f5f67267dc4faecd9cba63894de92ca92a608b8 (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/x86/tools')
-rw-r--r-- | arch/x86/tools/Makefile | 15 | ||||
-rw-r--r-- | arch/x86/tools/chkobjdump.awk | 23 |
2 files changed, 35 insertions, 3 deletions
diff --git a/arch/x86/tools/Makefile b/arch/x86/tools/Makefile index 4688f90ce5a2..f82082677337 100644 --- a/arch/x86/tools/Makefile +++ b/arch/x86/tools/Makefile | |||
@@ -1,13 +1,22 @@ | |||
1 | PHONY += posttest | 1 | PHONY += posttest |
2 | 2 | ||
3 | ifeq ($(KBUILD_VERBOSE),1) | 3 | ifeq ($(KBUILD_VERBOSE),1) |
4 | postest_verbose = -v | 4 | posttest_verbose = -v |
5 | else | 5 | else |
6 | postest_verbose = | 6 | posttest_verbose = |
7 | endif | 7 | endif |
8 | 8 | ||
9 | ifeq ($(CONFIG_64BIT),y) | ||
10 | posttest_64bit = -y | ||
11 | else | ||
12 | posttest_64bit = -n | ||
13 | endif | ||
14 | |||
15 | distill_awk = $(srctree)/arch/x86/tools/distill.awk | ||
16 | chkobjdump = $(srctree)/arch/x86/tools/chkobjdump.awk | ||
17 | |||
9 | quiet_cmd_posttest = TEST $@ | 18 | quiet_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 | ||
12 | posttest: $(obj)/test_get_len vmlinux | 21 | posttest: $(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 000000000000..0d13cd9fdcff --- /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 | ||
5 | BEGIN { | ||
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 | } | ||