Todd Lipcon has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/9848 )
Change subject: KUDU-2378. Fix unaligned loads of int128 from rows ...................................................................... KUDU-2378. Fix unaligned loads of int128 from rows Our row format doesn't ensure any alignment of data. This is usually fine on x86 where unaligned loads of ints don't need any special instruction and carry a relatively low performance penalty. However, loads of int128_t may generate a 'movdqa' (aligned load) instruction which crashes if the operand is not 16-byte aligned. This fixes a bunch of spots where we are dereferencing a reinterpret_casted int and replaces them with new UnalignedLoad<> and UnalignedStore<> template functions. These use simple reinterpret_cast dereferences for <=64bit types. For int128_t we use memcpy. The compiler should already treat memcpy as an intrinsic and this will end up being a single instruction. Change-Id: Ic71149ed5c6881cb16dfe6cf8f7906c044a0b41a Reviewed-on: http://gerrit.cloudera.org:8080/9848 Tested-by: Kudu Jenkins Reviewed-by: Alexey Serbin <aser...@cloudera.com> Reviewed-by: Grant Henke <granthe...@apache.org> --- M src/kudu/cfile/bshuf_block.cc M src/kudu/cfile/bshuf_block.h M src/kudu/cfile/plain_block.h M src/kudu/cfile/rle_block.h M src/kudu/common/partial_row.cc M src/kudu/common/types.h M src/kudu/gutil/port.h M src/kudu/integration-tests/all_types-itest.cc 8 files changed, 93 insertions(+), 45 deletions(-) Approvals: Kudu Jenkins: Verified Alexey Serbin: Looks good to me, but someone else must approve Grant Henke: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/9848 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ic71149ed5c6881cb16dfe6cf8f7906c044a0b41a Gerrit-Change-Number: 9848 Gerrit-PatchSet: 8 Gerrit-Owner: Todd Lipcon <t...@apache.org> Gerrit-Reviewer: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Grant Henke <granthe...@apache.org> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon <t...@apache.org>