History log of /6.6.0/platform/CMakeLists.txt (Results 1 - 25 of 147)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v6.5.1
# d74d705a 06-Nov-2019 Dave Rigby <daver@couchbase.com>

MB-36776: Replace inefficient impl of htonll/ntohll with folly::Endian

platform.so has an implementation of the 64bit byteswap functions
ntohll() and htonll(), for platforms which don't

MB-36776: Replace inefficient impl of htonll/ntohll with folly::Endian

platform.so has an implementation of the 64bit byteswap functions
ntohll() and htonll(), for platforms which don't have that symbol
natively.

Profiling of ep-engine Writer threads highlighed that a large amount
of time (~5%) was being spent in platform's ntohll() / htonll()
functions. This was surprising, as:

a) I had assumed that modern Linux (CentOS 7) provided the 64bit
byteswap functions, and

b) Even if the OS doesn't have those functions, I assumed our
implementation shouldn't be _that_ slow.

(For context the top 10 functions in the profile are below, ntohll is
the 3rd hottest):

Overhead Command Shared Object Symbol
4.82% mc:writer_2 libsnappy.so.1.2.0 [.] snappy::internal::CompressFragment
4.33% mc:writer_2 [kernel.kallsyms] [k] _raw_spin_lock_irq
4.30% mc:writer_2 libplatform_so.so.0.1.0 [.] ntohll
2.82% mc:writer_2 libc-2.17.so [.] __memcpy_ssse3
2.49% mc:writer_2 libsnappy.so.1.2.0 [.] snappy::RawUncompress
2.36% mc:writer_2 [kernel.kallsyms] [k] _raw_spin_lock
1.99% mc:writer_2 libjemalloc.so.2 [.] je_malloc_usable_size
1.74% mc:writer_2 [kernel.kallsyms] [k] __radix_tree_lookup
1.43% mc:writer_2 libjemalloc.so.2 [.] je_malloc

Both my assumptions are actually incorrect:

- CentOS 7 (and other recent distros including Ubuntu 18.04) *don't*
have ntohll / htonll symbols. They *do* have functionally
equivilent function htobe64() since glibc 2.9 (2008), but that's a
different, Linux-specific symbol.

- Our implemenation _is_ slow - it's doing old-style manual byteswap,
which is 10x slower on mancouch than the GCC compiler intrinsic
__builtin_bswap64:

Run on (24 X 2400 MHz CPU s)
2019-11-06 12:20:30
-----------------------------------------------------
Benchmark Time CPU Iterations
-----------------------------------------------------
Swap64 57 ns 57 ns 12216131
BuiltinSwap64 5 ns 5 ns 141279127

Given we already have an optimized byteswap implementation available
from Folly, use that instead. Also inline the functions to reduce the
call overhead.

This results in the same performance as the GCC compiler intrinsic
(but is cross-platform):

Run on (24 X 2400 MHz CPU s)
2019-11-06 12:33:05
-----------------------------------------------------
Benchmark Time CPU Iterations
-----------------------------------------------------
Swap64 57 ns 57 ns 12507068
FollySwap64 5 ns 5 ns 135655965
BuiltinSwap64 5 ns 5 ns 100000000

Change-Id: I472be7705622b800c9849bfc0615fb49a73ccce8
Reviewed-on: http://review.couchbase.org/117439
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@couchbase.com>
Reviewed-by: Richard de Mellow <richard.demellow@couchbase.com>
Reviewed-by: Paolo Cocchi <paolo.cocchi@couchbase.com>

show more ...


# 58590f55 21-Oct-2019 Trond Norbye <trond.norbye@gmail.com>

Mark folly as a system directory

Change-Id: Iaf563c2f0f75d16f4a1f354c5a6d6ca8bb923183
Reviewed-on: http://review.couchbase.org/116713
Tested-by: Build Bot <build@couchbase.com>
R

Mark folly as a system directory

Change-Id: Iaf563c2f0f75d16f4a1f354c5a6d6ca8bb923183
Reviewed-on: http://review.couchbase.org/116713
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


Revision tags: v6.0.3
# cdf833f2 24-Apr-2019 Richard de Mellow <richard.demellow@couchbase.com>

CBD-2920 Fix compile errors with Xcode 10.2 command line tools

Fix compile errors with Xcode 10.2 command line tools after upgrading to
nlohmann::json v3.5.0.

Also as part of th

CBD-2920 Fix compile errors with Xcode 10.2 command line tools

Fix compile errors with Xcode 10.2 command line tools after upgrading to
nlohmann::json v3.5.0.

Also as part of this move functions that require <sstream> in pipe.h to
a pipe.cc so that we may use nlohmann/json_fwd.hpp.

Change-Id: I07478540030c758ff3a6c839f8aea83ecb8a4c16
Reviewed-on: http://review.couchbase.org/108663
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@couchbase.com>

show more ...


# 4008588f 30-Apr-2019 Trond Norbye <trond.norbye@gmail.com>

Cleanup: Correctly mark breakpad headers as system

In addition to that we don't need to add that directory
and #define to all of the targets in platform.

Change-Id: I60b8fe13c8f

Cleanup: Correctly mark breakpad headers as system

In addition to that we don't need to add that directory
and #define to all of the targets in platform.

Change-Id: I60b8fe13c8ff5ce4846d4ee6f3b7d2f153a649e4
Reviewed-on: http://review.couchbase.org/108439
Reviewed-by: Daniel Owen <owend@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@couchbase.com>

show more ...


# becffd3b 29-Mar-2019 Trond Norbye <trond.norbye@gmail.com>

Cleanup: Remove __sun and __FreeBSD__ code

We don't build on those platforms and we have no idea of
the current status.

Change-Id: Ifa752904f7c69c7d4fa188deb223e4aabed23fa9

Cleanup: Remove __sun and __FreeBSD__ code

We don't build on those platforms and we have no idea of
the current status.

Change-Id: Ifa752904f7c69c7d4fa188deb223e4aabed23fa9
Reviewed-on: http://review.couchbase.org/106994
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>

show more ...


# 079961ee 27-Mar-2019 Trond Norbye <trond.norbye@gmail.com>

MB-33327: Add support for software-only CRC32

If the target CPU isn't X86 don't try to use HW assisted functions

Change-Id: If1c021e97fde5842b158aca7ed886de7d0434b89
Reviewed-on

MB-33327: Add support for software-only CRC32

If the target CPU isn't X86 don't try to use HW assisted functions

Change-Id: If1c021e97fde5842b158aca7ed886de7d0434b89
Reviewed-on: http://review.couchbase.org/106855
Tested-by: Trond Norbye <trond.norbye@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>

show more ...


Revision tags: v5.5.4
# f3d54c1c 18-Mar-2019 Ben Huddleston <ben.huddleston@couchbase.com>

MB-30040: Use folly's cacheline padded

Change-Id: Icc1a112609da8dac979f07b6e02916278131270a
Reviewed-on: http://review.couchbase.org/106427
Tested-by: Build Bot <build@couchbase.com>

MB-30040: Use folly's cacheline padded

Change-Id: Icc1a112609da8dac979f07b6e02916278131270a
Reviewed-on: http://review.couchbase.org/106427
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


# da567ebf 20-Mar-2019 Trond Norbye <trond.norbye@gmail.com>

Get rid of config.h

Define all flags as compiler options with -DFOO=1

Change-Id: I8deab908c9feb08a090a56dafa8c3a9ecb1ed1e3
Reviewed-on: http://review.couchbase.org/106500
Te

Get rid of config.h

Define all flags as compiler options with -DFOO=1

Change-Id: I8deab908c9feb08a090a56dafa8c3a9ecb1ed1e3
Reviewed-on: http://review.couchbase.org/106500
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


# 7b4c8fa3 05-Nov-2018 Dave Rigby <daver@couchbase.com>

MB-30040: Update platform to use Folly

Change-Id: Id2eeb0205ff3c1ddf4269876366613b4860c6c2a
Reviewed-on: http://review.couchbase.org/101368
Tested-by: Build Bot <build@couchbase.com>

MB-30040: Update platform to use Folly

Change-Id: Id2eeb0205ff3c1ddf4269876366613b4860c6c2a
Reviewed-on: http://review.couchbase.org/101368
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@couchbase.com>

show more ...


# 2f179c80 14-Mar-2019 Trond Norbye <trond.norbye@gmail.com>

Remove C interface to our own random provider

And:

* Move platform specific code back into random.cc
as it's basically 3 small function calls

* move to the shor

Remove C interface to our own random provider

And:

* Move platform specific code back into random.cc
as it's basically 3 small function calls

* move to the shorter cb namespace

* Export the entire class

* clang-format

* Removed non-shared provider (not used)

Change-Id: Ic5163cf0d6e06804241498a1ba44cdb0d6fb9426
Reviewed-on: http://review.couchbase.org/106180
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


# 1a6af9b4 08-Mar-2019 Trond Norbye <trond.norbye@gmail.com>

Include what you use

Remove platform/platform.h

Change-Id: I593b9124c79660566b4e316a2e5f852351f3ded9
Reviewed-on: http://review.couchbase.org/106046
Reviewed-by: Dave Rigby

Include what you use

Remove platform/platform.h

Change-Id: I593b9124c79660566b4e316a2e5f852351f3ded9
Reviewed-on: http://review.couchbase.org/106046
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# 9809835f 07-Mar-2019 Trond Norbye <trond.norbye@gmail.com>

Remove cb_mktemp (use cb::io::mktemp instead)

Change-Id: I4443740b4b2731582d40edb89ae3173615beb143
Reviewed-on: http://review.couchbase.org/105845
Reviewed-by: Paolo Cocchi <paolo.co

Remove cb_mktemp (use cb::io::mktemp instead)

Change-Id: I4443740b4b2731582d40edb89ae3173615beb143
Reviewed-on: http://review.couchbase.org/105845
Reviewed-by: Paolo Cocchi <paolo.cocchi@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# efea6ba7 01-Mar-2019 Ben Huddleston <ben.huddleston@couchbase.com>

MB-30040: Introduce platform_socket.h

Pulling in folly is a massive PITA because of how much stuff is in
the platform.h header file. To make this easier, split platform.h
into a numb

MB-30040: Introduce platform_socket.h

Pulling in folly is a massive PITA because of how much stuff is in
the platform.h header file. To make this easier, split platform.h
into a number of logically grouped header files that can be included
instead.

Move the socket declarations into their own header file. Don't move
them to "socket.h" as that's a C++ header file and there are C
consumers of these declarations.

Change-Id: I65163833f0265a98b1baee6bcbba1f3c0be71eda
Reviewed-on: http://review.couchbase.org/105543
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


# adda26cd 27-Feb-2019 Ben Huddleston <ben.huddleston@couchbase.com>

MB-30040: Introduce platform_time.h

Pulling in folly is a massive PITA because of how much stuff is in
the platform.h header file. To make this easier, split platform.h
into a number

MB-30040: Introduce platform_time.h

Pulling in folly is a massive PITA because of how much stuff is in
the platform.h header file. To make this easier, split platform.h
into a number of logically grouped header files that can be included
instead.

Move the time declarations into their own header file.

Change-Id: Ie1bd9deafda7362f472ab10622575c15fb9b25cc
Reviewed-on: http://review.couchbase.org/105541
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# e463c941 26-Feb-2019 Ben Huddleston <ben.huddleston@couchbase.com>

MB-30040: Introduce platform_thread.h

Pulling in folly is a massive PITA because of how much stuff is in
the platform.h header file. To make this easier, split platform.h
into a numb

MB-30040: Introduce platform_thread.h

Pulling in folly is a massive PITA because of how much stuff is in
the platform.h header file. To make this easier, split platform.h
into a number of logically grouped header files that can be included
instead.

Move the thread and locking declarations into their own header file.

Change-Id: I38f14d9e6c1653c31ac516f0618a909123ca4b72
Reviewed-on: http://review.couchbase.org/105526
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# 2c341c3a 27-Feb-2019 Ben Huddleston <ben.huddleston@couchbase.com>

MB-30040: Remove get_pid()

Pulling in folly is a massive PITA because of how much stuff is in
the platform.h header file. To make this easier, remove the now no
longer necessary pid

MB-30040: Remove get_pid()

Pulling in folly is a massive PITA because of how much stuff is in
the platform.h header file. To make this easier, remove the now no
longer necessary pid related code.

Change-Id: I36ef382d01ed4513ba915daea816c74ac3c21ee8
Reviewed-on: http://review.couchbase.org/105463
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# 317588cb 19-Feb-2019 Trond Norbye <trond.norbye@gmail.com>

Remove unused functions from platform

Change-Id: I9fa20c1ad29ba96477236e0d25ac976626975b36
Reviewed-on: http://review.couchbase.org/105031
Reviewed-by: Dave Rigby <daver@couchbase.co

Remove unused functions from platform

Change-Id: I9fa20c1ad29ba96477236e0d25ac976626975b36
Reviewed-on: http://review.couchbase.org/105031
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# 05a71da4 05-Feb-2019 Trond Norbye <trond.norbye@gmail.com>

MB-32514: Remove unused dependency cJSON

Everything is moved over to nlohmann::json

Change-Id: I9587fea7aa75f1c8dceb96910e35412b1c122f27
Reviewed-on: http://review.couchbase.org

MB-32514: Remove unused dependency cJSON

Everything is moved over to nlohmann::json

Change-Id: I9587fea7aa75f1c8dceb96910e35412b1c122f27
Reviewed-on: http://review.couchbase.org/104520
Reviewed-by: Daniel Owen <owend@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# 945fb58d 01-Feb-2019 Dave Rigby <daver@couchbase.com>

Ignore compiler warnings from Breakpad headers

Mark the Breakpad include directory as 'SYSTEM' so CMake will ignore
any errors from it (we arn't in control of it's contents so the
wa

Ignore compiler warnings from Breakpad headers

Mark the Breakpad include directory as 'SYSTEM' so CMake will ignore
any errors from it (we arn't in control of it's contents so the
warnings are basically useless).

Change-Id: I8c78fae82cc144cc0ffa5280809e1f3bed865b40
Reviewed-on: http://review.couchbase.org/104404
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Ben Huddleston <ben.huddleston@couchbase.com>

show more ...


# a527ec24 25-Jan-2019 Dave Rigby <daver@couchbase.com>

Replace <?stream> includes with <iosfwd> where possible

In header files which only refer to types in the <?stream> headers
(such as std::stringstream, std::ostream, ...) we can avoid inc

Replace <?stream> includes with <iosfwd> where possible

In header files which only refer to types in the <?stream> headers
(such as std::stringstream, std::ostream, ...) we can avoid including
the costly full <?stream> header and instead use <iosfwd> which is
~10x smaller.

Also de-inline operator<<() for const_char_buffer to avoid including
<ostream> from sized_buffer.h.

Change-Id: If16704c59a9c739d9765867cc496164df97931d7
Reviewed-on: http://review.couchbase.org/104063
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@couchbase.com>

show more ...


# df853e9b 03-Jan-2019 Dave Rigby <daver@couchbase.com>

MB-32016: Add 'unsanitized' variant of platform libs

If one or more sanitizers are enabled (AddressSanitizer,
ThreadSanitizer, ...) then define an additional variant of platform
libs

MB-32016: Add 'unsanitized' variant of platform libs

If one or more sanitizers are enabled (AddressSanitizer,
ThreadSanitizer, ...) then define an additional variant of platform
libs which has the sanitizers /disabled/. This allows targets which
require platform, but which are incompatible with the sanitizers
(e.g. Erlang NIFs) to still be built and run when we are building the
rest of the Server with sanitizer support.

Targets which suffer from this limitation can link against
'platform_unsanitized' instead of 'platform' to obtain a library which
doesn't use any of the sanitizers.

Change-Id: I0e979b690af5a0dcf87373020999f3f6a170430f
Reviewed-on: http://review.couchbase.org/103244
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# a28cd348 27-Sep-2018 Dave Rigby <daver@couchbase.com>

Rename <platform/string.h> to <platform/string_hex.h

string.h in platform/ can collide with the system <string.h> header
under certain, complex include paths. Given platform/string.h dea

Rename <platform/string.h> to <platform/string_hex.h

string.h in platform/ can collide with the system <string.h> header
under certain, complex include paths. Given platform/string.h deals
with to/from hex encoding, rename to string_hex.h to avoid the
collision.

Change-Id: I22ce0c2235e3e0e0fa366542fc617d2dd37a3399
Reviewed-on: http://review.couchbase.org/100057
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>

show more ...


# e81dcfb8 26-Jun-2018 Trond Norbye <trond.norbye@gmail.com>

Refactor: Make RAII version of MemoryMappedFile

Given that we're changing how it works the new version is
put in cb::io, and the "old and deprecated" one is left
in the cb namespace

Refactor: Make RAII version of MemoryMappedFile

Given that we're changing how it works the new version is
put in cb::io, and the "old and deprecated" one is left
in the cb namespace (but utilize the new one while we
migrate over to the new one).

Change-Id: Iab62f122ba590a11cd7e56995bf3862a99dbacf8
Reviewed-on: http://review.couchbase.org/96101
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# 62260a71 21-Jun-2018 Trond Norbye <trond.norbye@gmail.com>

Remove unused method gethrtime()

Change-Id: Ide8c77e30a1cf67d60c87f35866a33985ffb0157
Reviewed-on: http://review.couchbase.org/95932
Tested-by: Build Bot <build@couchbase.com>
Re

Remove unused method gethrtime()

Change-Id: Ide8c77e30a1cf67d60c87f35866a33985ffb0157
Reviewed-on: http://review.couchbase.org/95932
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Tim Bradgate <tim.bradgate@couchbase.com>

show more ...


# fe57078c 13-Jun-2018 Trond Norbye <trond.norbye@gmail.com>

C++14: Include <memory> instead of <platform/make_unique.h>

Change-Id: I05572aff64393885a35bf54c1a1a5a3a9c33d894
Reviewed-on: http://review.couchbase.org/95564
Reviewed-by: Dave Rigb

C++14: Include <memory> instead of <platform/make_unique.h>

Change-Id: I05572aff64393885a35bf54c1a1a5a3a9c33d894
Reviewed-on: http://review.couchbase.org/95564
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


123456