@@ -56,6 +56,7 @@ extern void alternative_instructions(void);
#define ALTERNATIVE_N(newinstr, feature, number) \
".pushsection .altinstructions,\"a\"\n" \
+ ".p2align 2\n" \
ALTINSTR_ENTRY(feature, number) \
".section .discard,\"a\",@progbits\n" \
DISCARD_ENTRY(number) \
$ ~/linux/scripts/bloat-o-meter /tmp/xen-syms.baseline.debug xen-syms
add/remove: 0/0 grow/shrink: 1/2 up/down: 87/-237 (-150)
function old new delta
sh_page_fault__guest_4 8557 8644 +87
map_pages_to_xen 4406 4322 -84
sh_x86_emulate_write__guest_4 444 291 -153
Total: Before=3315124, After=3314974, chg -0.00%
[konrad@localhost xen]$
I get the same amount if the '.p2align 2' is in .altinstr_replacement":
@@ -60,6 +60,7 @@ extern void alternative_instructions(void);
".section .discard,\"a\",@progbits\n" \
DISCARD_ENTRY(number) \
".section .altinstr_replacement, \"ax\"\n" \
+ ".p2align 2\n" \
ALTINSTR_REPLACEMENT(newinstr, feature, number) \
".popsection\n"
For fun I changed p2align to 1:
@@ -60,6 +60,7 @@ extern void alternative_instructions(void);
".section .discard,\"a\",@progbits\n" \
DISCARD_ENTRY(number) \
".section .altinstr_replacement, \"ax\"\n" \
+ ".p2align 1\n" \
ALTINSTR_REPLACEMENT(newinstr, feature, number) \
".popsection\n"
[konrad@localhost xen]$ ~/linux/scripts/bloat-o-meter /tmp/xen-syms.baseline.debug xen-syms
add/remove: 0/0 grow/shrink: 1/2 up/down: 87/-237 (-150)
function old new delta
sh_page_fault__guest_4 8557 8644 +87
map_pages_to_xen 4406 4322 -84
sh_x86_emulate_write__guest_4 444 291 -153
Total: Before=3315124, After=3314974, chg -0.00%
And then to 0.
@@ -60,6 +60,7 @@ extern void alternative_instructions(void);
".section .discard,\"a\",@progbits\n" \
DISCARD_ENTRY(number) \
".section .altinstr_replacement, \"ax\"\n" \
+ ".p2align 0\n" \
ALTINSTR_REPLACEMENT(newinstr, feature, number) \
".popsection\n"
[konrad@localhost xen]$ ~/linux/scripts/bloat-o-meter /tmp/xen-syms.baseline.debug xen-syms
add/remove: 0/0 grow/shrink: 1/2 up/down: 87/-237 (-150)
function old new delta
sh_page_fault__guest_4 8557 8644 +87
map_pages_to_xen 4406 4322 -84
sh_x86_emulate_write__guest_4 444 291 -153
Total: Before=3315124, After=3314974, chg -0.00%
WTF?!
[konrad@localhost xen]$ git diff
@@ -60,6 +60,7 @@ extern void alternative_instructions(void);
".section .discard,\"a\",@progbits\n" \
DISCARD_ENTRY(number) \
".section .altinstr_replacement, \"ax\"\n" \
+ "# HI!\n" \
ALTINSTR_REPLACEMENT(newinstr, feature, number) \
".popsection\n"