Skip to content

Conversation

@pcmoritz
Copy link
Contributor

This separates the allocator into a part that is only linked into the store (dlmalloc.cc, containing dlmalloc) and a part that is only linked into the client (malloc.cc, not containing dlmalloc). Also a small build system cleanup (not adding the thirdparty/ directory to the include path).

Copy link
Member

@xhochy xhochy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM

@wesm
Copy link
Member

wesm commented Mar 16, 2019

This needs to be rebased after merging #3928. It would probably be a good idea to check that the static/shared-only builds aren't broken by this

@wesm wesm force-pushed the split-plasma-server-client branch from e24f56f to 7fd7bd0 Compare March 17, 2019 21:39
@wesm
Copy link
Member

wesm commented Mar 17, 2019

Rebased and fixed merge conflict

Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks worthwhile in principle, just two comments.

int64_t GetMmapSize(int fd);

void SetMallocGranularity(int value);
struct mmap_record {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't you put all this in a namespace?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I put everything in a namespace now!

return -1;
}

FILE* file = fdopen(fd, "a+");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize this is just being moved around, but FTR I fail to understand what the file achieves. It's not used in any case below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I removed it (both fdopen and also the dup further below).

cmake changes

add missing file

fixes

cmake-format

revert dlmalloc.c rename

clang-format

fix

shuffle more files

update
@pcmoritz pcmoritz force-pushed the split-plasma-server-client branch from 7fd7bd0 to ab5f616 Compare March 18, 2019 20:37
@codecov-io
Copy link

Codecov Report

Merging #3927 into master will increase coverage by 0.81%.
The diff coverage is 70.49%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3927      +/-   ##
==========================================
+ Coverage   87.83%   88.64%   +0.81%     
==========================================
  Files         728      595     -133     
  Lines       89822    80188    -9634     
  Branches     1252        0    -1252     
==========================================
- Hits        78891    71086    -7805     
+ Misses      10814     9102    -1712     
+ Partials      117        0     -117
Impacted Files Coverage Δ
cpp/src/plasma/events.cc 88.88% <ø> (ø) ⬆️
cpp/src/plasma/store.h 100% <ø> (ø) ⬆️
cpp/src/plasma/io.cc 73.64% <ø> (ø) ⬆️
cpp/src/plasma/thirdparty/ae/ae.c 70.75% <ø> (-0.95%) ⬇️
cpp/src/plasma/plasma.cc 70.37% <100%> (-2.97%) ⬇️
cpp/src/plasma/malloc.cc 76.19% <100%> (+9.52%) ⬆️
cpp/src/plasma/dlmalloc.cc 65.3% <65.3%> (ø)
cpp/src/plasma/store.cc 91.23% <88.88%> (+0.07%) ⬆️
go/arrow/math/uint64_amd64.go
... and 134 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4107529...77cd7cd. Read the comment docs.

@pcmoritz
Copy link
Contributor Author

@wesm: The static linking docker compose test if failing with

[347/383] Linking CXX executable debug/parquet-encoding-benchmark
FAILED: debug/parquet-encoding-benchmark
: && /opt/conda/bin/ccache /usr/bin/g++  -Wno-noexcept-type  -fdiagnostics-color=always -ggdb -O0  -Wall -Wno-conversion -Wno-sign-conversion -Werror -msse4.2  -g  -rdynamic src/parquet/CMakeFiles/parquet-encoding-benchmark.dir/encoding-benchmark.cc.o  -o debug/parquet-encoding-benchmark  -Wl,-rpath,/opt/conda/lib /opt/conda/lib/libbenchmark_main.a debug/libparquet.a /opt/conda/lib/libbenchmark.a debug/libarrow.a /opt/conda/lib/libdouble-conversion.a /opt/conda/lib/libbrotlienc.so /opt/conda/lib/libbrotlidec.so /opt/conda/lib/libbrotlicommon.so /opt/conda/lib/libbz2.so /opt/conda/lib/liblz4.so /opt/conda/lib/libsnappy.so.1.1.7 /opt/conda/lib/libz.so /opt/conda/lib/libzstd.so orc_ep-install/lib/liborc.a /opt/conda/lib/libprotobuf.so /opt/conda/lib/libglog.so /opt/conda/lib/libboost_system.so /opt/conda/lib/libboost_filesystem.so jemalloc_ep-prefix/src/jemalloc_ep/dist//lib/libjemalloc_pic.a -pthread -lrt /opt/conda/lib/libboost_regex.so /opt/conda/lib/libthrift.so && :
src/parquet/CMakeFiles/parquet-encoding-benchmark.dir/encoding-benchmark.cc.o: In function `testing::AssertionResult::AppendMessage(testing::Message const&)':
/opt/conda/include/gtest/gtest.h:352: undefined reference to `testing::Message::GetString[abi:cxx11]() const'
src/parquet/CMakeFiles/parquet-encoding-benchmark.dir/encoding-benchmark.cc.o: In function `parquet::BenchmarkDecodeArrow::InitDataInputs()':
/arrow/cpp/src/parquet/encoding-benchmark.cc:201: undefined reference to `arrow::random::RandomArrayGenerator::StringWithRepeats(long, long, int, int, double)'
src/parquet/CMakeFiles/parquet-encoding-benchmark.dir/encoding-benchmark.cc.o: In function `parquet::BM_DictDecodingByteArray::DoEncodeData()':
/arrow/cpp/src/parquet/encoding-benchmark.cc:317: undefined reference to `testing::internal::AlwaysTrue()'
/arrow/cpp/src/parquet/encoding-benchmark.cc:317: undefined reference to `testing::internal::AlwaysTrue()'
/arrow/cpp/src/parquet/encoding-benchmark.cc:317: undefined reference to `testing::Message::Message()'
/arrow/cpp/src/parquet/encoding-benchmark.cc:317: undefined reference to `testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type, char const*, int, char const*)'
/arrow/cpp/src/parquet/encoding-benchmark.cc:317: undefined reference to `testing::internal::AssertHelper::operator=(testing::Message const&) const'
/arrow/cpp/src/parquet/encoding-benchmark.cc:317: undefined reference to `testing::internal::AssertHelper::~AssertHelper()'
/arrow/cpp/src/parquet/encoding-benchmark.cc:321: undefined reference to `testing::Message::Message()'
/arrow/cpp/src/parquet/encoding-benchmark.cc:321: undefined reference to `testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type, char const*, int, char const*)'
/arrow/cpp/src/parquet/encoding-benchmark.cc:321: undefined reference to `testing::internal::AssertHelper::operator=(testing::Message const&) const'
/arrow/cpp/src/parquet/encoding-benchmark.cc:321: undefined reference to `testing::internal::AssertHelper::~AssertHelper()'
/arrow/cpp/src/parquet/encoding-benchmark.cc:317: undefined reference to `testing::internal::AssertHelper::~AssertHelper()'
/arrow/cpp/src/parquet/encoding-benchmark.cc:321: undefined reference to `testing::internal::AssertHelper::~AssertHelper()'
src/parquet/CMakeFiles/parquet-encoding-benchmark.dir/encoding-benchmark.cc.o: In function `testing::internal::scoped_ptr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::reset(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)':
/opt/conda/include/gtest/internal/gtest-port.h:1215: undefined reference to `testing::internal::IsTrue(bool)'
src/parquet/CMakeFiles/parquet-encoding-benchmark.dir/encoding-benchmark.cc.o: In function `testing::AssertionResult testing::internal::CmpHelperNE<parquet::DictEncoder<parquet::DataType<(parquet::Type::type)6> >*, decltype(nullptr)>(char const*, char const*, parquet::DictEncoder<parquet::DataType<(parquet::Type::type)6> >* const&, decltype(nullptr) const&)':
/opt/conda/include/gtest/gtest.h:1573: undefined reference to `testing::AssertionSuccess()'
src/parquet/CMakeFiles/parquet-encoding-benchmark.dir/encoding-benchmark.cc.o: In function `testing::internal::scoped_ptr<std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> > >::reset(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >*)':
/opt/conda/include/gtest/internal/gtest-port.h:1215: undefined reference to `testing::internal::IsTrue(bool)'
src/parquet/CMakeFiles/parquet-encoding-benchmark.dir/encoding-benchmark.cc.o: In function `testing::AssertionResult testing::internal::CmpHelperOpFailure<parquet::DictEncoder<parquet::DataType<(parquet::Type::type)6> >*, decltype(nullptr)>(char const*, char const*, parquet::DictEncoder<parquet::DataType<(parquet::Type::type)6> >* const&, decltype(nullptr) const&, char const*)':
/opt/conda/include/gtest/gtest.h:1541: undefined reference to `testing::AssertionFailure()'
/opt/conda/include/gtest/gtest.h:1543: undefined reference to `testing::AssertionResult::AssertionResult(testing::AssertionResult const&)'
src/parquet/CMakeFiles/parquet-encoding-benchmark.dir/encoding-benchmark.cc.o: In function `testing::AssertionResult& testing::AssertionResult::operator<< <char [12]>(char const (&) [12])':
/opt/conda/include/gtest/gtest.h:335: undefined reference to `testing::Message::Message()'
src/parquet/CMakeFiles/parquet-encoding-benchmark.dir/encoding-benchmark.cc.o: In function `testing::AssertionResult& testing::AssertionResult::operator<< <char const*>(char const* const&)':
/opt/conda/include/gtest/gtest.h:335: undefined reference to `testing::Message::Message()'
src/parquet/CMakeFiles/parquet-encoding-benchmark.dir/encoding-benchmark.cc.o: In function `testing::AssertionResult& testing::AssertionResult::operator<< <char [3]>(char const (&) [3])':
/opt/conda/include/gtest/gtest.h:335: undefined reference to `testing::Message::Message()'
src/parquet/CMakeFiles/parquet-encoding-benchmark.dir/encoding-benchmark.cc.o: In function `testing::AssertionResult& testing::AssertionResult::operator<< <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/opt/conda/include/gtest/gtest.h:335: undefined reference to `testing::Message::Message()'
src/parquet/CMakeFiles/parquet-encoding-benchmark.dir/encoding-benchmark.cc.o: In function `testing::AssertionResult& testing::AssertionResult::operator<< <char [5]>(char const (&) [5])':
/opt/conda/include/gtest/gtest.h:335: undefined reference to `testing::Message::Message()'
collect2: error: ld returned 1 exit status
[356/383] Building CXX object src/parquet/CMakeFiles/parquet-column_writer-test.dir/column_writer-test.cc.o
ninja: build stopped: subcommand failed.

for me. I'm pretty sure it's unrelated to this PR, any idea what is going on?

@wesm
Copy link
Member

wesm commented Mar 19, 2019

Not sure, it might be a link order thing. Can you please open a JIRA?

@pcmoritz
Copy link
Contributor Author

pcmoritz commented Mar 19, 2019

@xhochy
Copy link
Member

xhochy commented Mar 19, 2019

See #3974 for a fix

Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, thanks for the changes

@pitrou pitrou closed this in 9c33e1a Mar 19, 2019
pcmoritz added a commit to pcmoritz/arrow that referenced this pull request Mar 19, 2019
This separates the allocator into a part that is only linked into the store (dlmalloc.cc, containing dlmalloc) and a part that is only linked into the client (malloc.cc, not containing dlmalloc). Also a small build system cleanup (not adding the thirdparty/ directory to the include path).

Author: Philipp Moritz <pcmoritz@gmail.com>

Closes apache#3927 from pcmoritz/split-plasma-server-client and squashes the following commits:

77cd7cd <Philipp Moritz> update
d5de8fc <Philipp Moritz> clean up plasma file descriptor handling
1c979d2 <Philipp Moritz> update
57903be <Philipp Moritz> update
aa40a2b <Philipp Moritz> put functions into namespace
81e53ac <Philipp Moritz> increase timeout
ab5f616 <Philipp Moritz> separate client and store code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants