00:20.07 | *** join/#elinux Russ (~russ@172.56.9.55) |
00:20.07 | *** mode/#elinux [+o Russ] by ChanServ |
01:46.27 | *** join/#elinux warthog9 (~warthog9@149.20.54.19) |
02:36.26 | *** join/#elinux m4t (matt@2604:180::34ea:9d4b) |
05:22.00 | *** join/#elinux Russ (foobar@pool-108-0-19-96.lsanca.fios.verizon.net) |
05:22.04 | *** mode/#elinux [+o Russ] by ChanServ |
09:31.48 | *** join/#elinux diego_r (~diego@host65-246-static.10-188-b.business.telecomitalia.it) |
09:52.48 | *** join/#elinux jkridner (~jkridner@c-98-250-189-79.hsd1.mi.comcast.net) |
09:52.48 | *** join/#elinux jkridner (~jkridner@pdpc/supporter/active/jkridner) |
12:00.17 | *** join/#elinux jkridner (~jkridner@pdpc/supporter/active/jkridner) |
12:10.54 | *** join/#elinux arun (~arun@unaffiliated/sindian) |
13:44.41 | *** join/#elinux rcw (~rwoolley@128.224.252.2) |
13:59.04 | *** join/#elinux gustavoz (~gustavoz@host228.190-226-84.telecom.net.ar) |
14:33.41 | *** join/#elinux manjo (~manjo@2602:301:772c:4d30:896e:1c94:c6f9:16b) |
14:33.50 | *** join/#elinux manjo (~manjo@ubuntu/member/manjo) |
17:57.05 | *** join/#elinux ac_slater (~weechat@128.89.69.173) |
17:58.23 | ac_slater | hey guys, I just started doing some ARM linux development. Most of my work will be in C++. How concerned should I be regarding alignment? Being used to x86, I've not put a lot of effort into cache-level optimizations. Is there a book on this subject? Preferably with examples .. not just integer access. |
17:58.26 | ac_slater | thanks! |
18:01.30 | spe{trum | just pay attention to 4 bytes alignment access, that's all |
18:07.19 | ac_slater | spe{trum: I guess I'm mainly concerned with class/instance access. Should instances be aligned against something? |
18:08.52 | ac_slater | ie - to what extent should DATA be aligned - heap data and stack data |
18:32.40 | spe{trum | just care of this |
18:33.15 | spe{trum | unsigned long mylong = *(unsigned long*)ptr; |
18:33.40 | spe{trum | if ptr is not multiple of 4 this fill fail |
18:33.44 | spe{trum | *will |
18:33.53 | ac_slater | 'fail' == cause unaligned access? |
18:34.05 | spe{trum | you read a wrong value yes |
18:34.19 | ac_slater | right. That's pretty obvious, but a good illustration |
18:34.34 | spe{trum | in this case, you have to provide some macros to read byte by byte |
18:35.13 | spe{trum | except of this, i don't have other issues using c++ with arm |
18:35.26 | ac_slater | right. Sadly I get all mixed up since a lot of byte level (and pointer) access is masked behind c++ classes. |
18:36.20 | ac_slater | awesome. I use valgrind/cachegrind for debugging/profiling. Do you recommend anything else? I'd like to see proof where I mess up caching. |
18:37.55 | spe{trum | whats exactly your issue ? compiler manage by himself alignments for members, you have this issues when you read packed structs for example from the network |
18:38.50 | spe{trum | when possible i have projects with 2 makefiles, build for i386 (for valgrind tests) and for arm |
18:38.55 | spe{trum | are you working from linux ? |
18:42.23 | spe{trum | i actually have gdb on the target, valgrind tests on pc side. Also on PC side i do cppunit1 tests |
18:42.56 | ac_slater | spe{trum: yea linux. And I don't have issues really. I just put almost no effort into alignment. Now I'm writing my own allocators and stumbled across std::align and various boost aligned allocators ... they make me think that EVERYTHING should be aligned |
18:43.11 | ac_slater | we have a similar workflow... I do the same, x86 and arm, valgrind on both, gdb on both |
20:09.56 | ac_slater | spe{trum: I used to do the same, tests/profile in x86 then run on arm... until I started seeing weird ARM specific things happening and no test runs to reflect it. So I started profiling and testing (cppunit) on arm as well. |
20:51.42 | *** join/#elinux akp (~akp@50.133.254.143) |
21:04.16 | *** join/#elinux baozich (~baozich@ec2-54-186-21-246.us-west-2.compute.amazonaws.com) |