Grant Henke has uploaded this change for review. ( http://gerrit.cloudera.org:8080/10110
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 <[email protected]> Reviewed-by: Grant Henke <[email protected]> (cherry picked from commit 35940a12aa38dedeff7e932f91448d2562163302) --- 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(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/10/10110/1 -- To view, visit http://gerrit.cloudera.org:8080/10110 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: branch-1.7.x Gerrit-MessageType: newchange Gerrit-Change-Id: Ic71149ed5c6881cb16dfe6cf8f7906c044a0b41a Gerrit-Change-Number: 10110 Gerrit-PatchSet: 1 Gerrit-Owner: Grant Henke <[email protected]> Gerrit-Reviewer: Todd Lipcon <[email protected]>
