Interesting that I've seen essentially the same question
forwarded to me (even the same elfdump output :)).
It seems that it's the data that's preventing the text section
to get large pages (since the text section below seems ok
- it's not just the .text section that goes into the r-x pages
at the beginning).
You probably want to have a mapfile like:
text = A0x400000;
data = A0x400000;
bss = A0x400000;
Seongbae
David McDaniel wrote:
A binary is less 4M and demonstrates high ITLB miss rates. I decide to
experiment with making it larger to address the issue.
The first approach was to assemble the following .s file and link it into the
target binaries:
.section ".text"
.align 4096*1024
.skip 8
This resulted in an enlarged binary which does get mapped on 4M boundary and which results in ~50% reduction in ITLB_miss rates as reported by cputrack.
Thinking this business of linking in bogus .o files to be pretty ugly, I tried to use a mapfile as follows to perhaps more effectively and simply achieve the same result:
text = A0x400000;
text = R0x400000;
This also results in an enlarged binary but does *not* result in a reduction
in ITLB_miss rates. Upon further investigation, it appears that the mapfile
option does not behave as expected:
# dump -h a.out
a.out:
**** SECTION HEADER TABLE ****
[No] Type Flags Addr Offset Size Name
Link Info Adralgn Entsize
[1] 1 2 0x800000 0x400000 0x11 .interp
0 0 0x400000 0
[2] 5 2 0x800014 0x400014 0x42ec .hash
3 0 0x4 0x4
[3] 11 2 0x804300 0x404300 0x85c0 .dynsym
4 1 0x4 0x10
[4] 3 34 0x80c8c0 0x40c8c0 0x14ec0 .dynstr
0 0 0x1 0
[5] 1879048190 2 0x821780 0x421780 0x50 .SUNW_version
4 2 0x4 0
[6] 4 66 0x8217d0 0x4217d0 0xc .rela.data
3 17 0x4 0xc
[7] 4 66 0x8217dc 0x4217dc 0x1e0 .rela.bss
3 19 0x4 0xc
[8] 4 66 0x8219bc 0x4219bc 0xed0 .rela.plt
3 15 0x4 0xc
[9] 1 6 0x822890 0x422890 0x313488 .text
0 0 0x8 0
[10] 1 6 0xb35d18 0x735d18 0x10 .init
0 0 0x4 0
[11] 1 6 0xb35d28 0x735d28 0xc .fini
0 0 0x4 0
... and so forth.
Despite the mapfile directive, the text section is not aligned and not
rounded up. The .interp section however *does* appear to have been rounded up.
I'm inclined to think the problem is simply that I dont know what the heck I'm
doing. Any ideas?
This message posted from opensolaris.org
_______________________________________________
perf-discuss mailing list
perf-discuss@opensolaris.org
_______________________________________________
perf-discuss mailing list
perf-discuss@opensolaris.org