History log of /6.0.3/platform/CMakeLists.txt (Results 1 - 25 of 121)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v6.0.3, v5.5.4, v5.5.0
# 2fbe5179 01-Jun-2018 Chris Hillery <ceej@couchbase.com>

MB-27060: Don't ship dbghelp.dll

Change-Id: Ib37e3987a6f2dcd56f8c11088ea8d645d92e882c
Reviewed-on: http://review.couchbase.org/95005
Tested-by: Chris Hillery <ceej@couchbase.com>

MB-27060: Don't ship dbghelp.dll

Change-Id: Ib37e3987a6f2dcd56f8c11088ea8d645d92e882c
Reviewed-on: http://review.couchbase.org/95005
Tested-by: Chris Hillery <ceej@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Chris Hillery <ceej@couchbase.com>

show more ...


# 1e351138 16-May-2018 Sundar Sridharan <sundar.sridharan@gmail.com>

Make cbsocket library building optional

For non-couchbase server builds that do not need cbsocket
it would be ok to skip building it.
For Couchbase Server builds this would make no d

Make cbsocket library building optional

For non-couchbase server builds that do not need cbsocket
it would be ok to skip building it.
For Couchbase Server builds this would make no difference
as it is ON by default.

Change-Id: Ib7d8f446454cd91da2d929541aa62b23dc1aa37a
Reviewed-on: http://review.couchbase.org/94308
Reviewed-by: Tim Bradgate <tim.bradgate@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Sundar Sridharan <sundar@couchbase.com>

show more ...


# cc62f3a2 04-May-2018 Trond Norbye <trond.norbye@gmail.com>

Refactor: make our getopt impl available as cb::getopt

This makes it easier to run the unit tests on all platforms
to fix bugs (Note that it is still only used on windows
"in product

Refactor: make our getopt impl available as cb::getopt

This makes it easier to run the unit tests on all platforms
to fix bugs (Note that it is still only used on windows
"in production")

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

show more ...


# e40463a5 03-May-2018 Trond Norbye <trond.norbye@gmail.com>

Include missing cmake include CheckIncludeFile

The missing include cause failures on some platforms (I spottet
it on my Windows machine) with some versions of CMake. Given
that we us

Include missing cmake include CheckIncludeFile

The missing include cause failures on some platforms (I spottet
it on my Windows machine) with some versions of CMake. Given
that we use that function we should include the include file
anyway.

Change-Id: I17b2ef90c5ea0de714bce39219e26d903e8913ed
Reviewed-on: http://review.couchbase.org/93680
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Reviewed-by: Tim Bradgate <tim.bradgate@couchbase.com>

show more ...


Revision tags: v4.6.5, v5.0.0
# 72cbf62f 20-Jun-2017 Will Gardner <willg@rdner.io>

Add platform abstraction for registering SIGINT signal handlers

Cross-platform compatible support for SIGINT handling is non-trivial
since the cross-platform `signal` API works different

Add platform abstraction for registering SIGINT signal handlers

Cross-platform compatible support for SIGINT handling is non-trivial
since the cross-platform `signal` API works differently on different
platforms.

This patch introduces two functions to the platform API:
cb::set_sigint_handler and cb::clear_sigint_handler.

On Unix platforms this just uses the sigaction API. On Windows
this uses the ConsoleCtrlHandler API.

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

show more ...


# 5c6a39bc 15-Mar-2018 Dave Rigby <daver@couchbase.com>

MB-28714: Use CMake-generated visibility header

During testing of KV-Engine under UndefinedBehaviourSanitizer; it was
noted that platform's external (exported) symbols do not have the

MB-28714: Use CMake-generated visibility header

During testing of KV-Engine under UndefinedBehaviourSanitizer; it was
noted that platform's external (exported) symbols do not have the
correct macro definition when importing the symbol.

Specifically, the PLATFORM_PUBLIC_API macro expands to nothing when
linking against platform; where instead it should expand to
(assuming Linux / macOS):

#define PLATFORM_PUBLIC_API _attribute_((visibility(default)))

This causes issues with RTTI and dynamic cast - there ends up being
multiple typeinfo symbols for the same class; meaning RTTI comparisons
fail - for example:

$ nm -mo memcached-get-set-tests ep.dylib ../platform/libplatform_so.dylib | c++filt|grep "typeinfo for cb::ProcessClockSource"
memcached-get-set-tests: 0000000100ab4040 (__DATA,__data) non-external (was signed char private external) typeinfo for cb::ProcessClockSource
../platform/libplatform_so.dylib: 000000000008cc20 (__DATA,__data) weak external typeinfo for cb::ProcessClockSource

Note how there's both a non-external and weak, external typeinfo for
this symbol.

To address this, remove our custom visibility header and use the
standard CMake-generated header - which does define the macro
correclty in the import case.

Change-Id: Iec9544884d9333ad9fe4ba53e88cd02d4b8dbe6d
Reviewed-on: http://review.couchbase.org/91014
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Tim Bradgate <tim.bradgate@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>

show more ...


# 6696145f 16-Feb-2018 Dave Rigby <daver@couchbase.com>

Replace INCLUDE_DIRECTORIES with TARGET_INCLUDE_DIRECTORIES

It is preferred to use target_include_directories() instead of
include_directories() to ensure that header dependancies are ex

Replace INCLUDE_DIRECTORIES with TARGET_INCLUDE_DIRECTORIES

It is preferred to use target_include_directories() instead of
include_directories() to ensure that header dependancies are explicit
(and we don't accidently depend on headers). See 'Effective Modern
CMake[1]' for background.

Replace include_directories() with target_include_directories() where
necessary, or simply remove include_directories() where it is
unnecessary - for example where a target already depends on a library
and the library has already declared its public includes.

To assist with this, an explicit 'platform_headers' interface library
has been created, targets which only wish to use platform's headers
(for example tests) can link to that library to get the correct search
paths.

[1]: https://gist.github.com/mbinna/c61dbb39bca0e4fb7d1f73b0d66a4fd1

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

show more ...


# 84f0d4dc 08-Mar-2018 Trond Norbye <trond.norbye@gmail.com>

No need to check for chrono as we require C++11

Change-Id: Ide0e2b63fe7bcc3129604df643928a7261433ece
Reviewed-on: http://review.couchbase.org/90646
Reviewed-by: Dave Rigby <daver@cou

No need to check for chrono as we require C++11

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

show more ...


# 78c05968 26-Feb-2018 Trond Norbye <trond.norbye@gmail.com>

Refactor: Use CMake to generate visibilty macros for cJSON

Use the CMake provided functionality to generate the header
file containing the visibility macros

Change-Id: Id78e1bf7

Refactor: Use CMake to generate visibilty macros for cJSON

Use the CMake provided functionality to generate the header
file containing the visibility macros

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

show more ...


# 654fd66c 16-Feb-2018 Dave Rigby <daver@couchbase.com>

Add missing headers to platform_so

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

Add missing headers to platform_so

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

show more ...


# 874f1147 24-Jan-2018 Trond Norbye <trond.norbye@gmail.com>

MB-27673: Add option to bypass building unit tests

Add platform into COUCHBASE_DISABLED_UNIT_TESTS to skip building
all of the unit tests.

Change-Id: I5d13f164a3ddec8db6321cf4e8

MB-27673: Add option to bypass building unit tests

Add platform into COUCHBASE_DISABLED_UNIT_TESTS to skip building
all of the unit tests.

Change-Id: I5d13f164a3ddec8db6321cf4e8e96accdbb1a3b8
Reviewed-on: http://review.couchbase.org/88353
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>

show more ...


# b5f07db5 16-Jan-2018 Jim Walker <jim@couchbase.com>

MB-24860: Add get_cpu_count and get_cpu_index

get_cpu_count returns the number of 'cores' installed in the system
get_cpu_index returns the index of the 'core' the caller is running on

MB-24860: Add get_cpu_count and get_cpu_index

get_cpu_count returns the number of 'cores' installed in the system
get_cpu_index returns the index of the 'core' the caller is running on

Together the methods are intended to assist in building core-local
storage, away to associate data with the running core

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

show more ...


# fe3bef91 08-Dec-2017 Trond Norbye <trond.norbye@gmail.com>

Upgrade required CMake version to match tlm

Change-Id: Ib43f80cb9e14d453674750350fd764b4b020a10f
Reviewed-on: http://review.couchbase.org/86570
Reviewed-by: Dave Rigby <daver@couchba

Upgrade required CMake version to match tlm

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

show more ...


# decc36eb 29-Nov-2017 Dave Rigby <daver@couchbase.com>

Histogram: de-inline expensive methods

Move a number of large / expensive Histogram<> methods from the header
(where they become inline) to a new histogram.cc file. The main
motivati

Histogram: de-inline expensive methods

Move a number of large / expensive Histogram<> methods from the header
(where they become inline) to a new histogram.cc file. The main
motivation for this is to expose the cost of these Histogram<> methods
in profiling etc, as currently they end up getting inlined into
various other methods and hence their cost is "smeared" across every
function which uses them.

Change-Id: Iad3d32b9a6e4734625ac604b28ca874e45eea83d
Reviewed-on: http://review.couchbase.org/86129
Reviewed-by: Jim Walker <jim@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# 0e38de53 28-Nov-2017 Trond Norbye <trond.norbye@gmail.com>

Prototype of LZ4 support

From all the examples I've seen they store the length of of
the inflated data along with the data to inflate (to be able
to allocate the correct output size)

Prototype of LZ4 support

From all the examples I've seen they store the length of of
the inflated data along with the data to inflate (to be able
to allocate the correct output size). This prototype does
it the same way (the compressed data isn't intended to leave
the node)

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

show more ...


# 4b5c476c 11-Oct-2017 Chris Hillery <ceej@couchbase.com>

Update name of 'supported platform' macro

Change-Id: I9066c811cb78f29fc4c710e19e3ed2b01f59b50f
Reviewed-on: http://review.couchbase.org/84248
Well-Formed: Build Bot <build@couchbase.

Update name of 'supported platform' macro

Change-Id: I9066c811cb78f29fc4c710e19e3ed2b01f59b50f
Reviewed-on: http://review.couchbase.org/84248
Well-Formed: Build Bot <build@couchbase.com>
Reviewed-by: Chris Hillery <ceej@couchbase.com>
Tested-by: Chris Hillery <ceej@couchbase.com>

show more ...


# 14603289 03-Oct-2017 Eugen-Alexandru Virtan <eugen.virtan@couchbase.com>

MB-26047:[2] Migrate away from using gethrtime()

Replace uses of gethrtime() with ProcessClock::now() and refactor
related code to use typesafe <chrono> time units.

Change-Id: I

MB-26047:[2] Migrate away from using gethrtime()

Replace uses of gethrtime() with ProcessClock::now() and refactor
related code to use typesafe <chrono> time units.

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

show more ...


# 2d971aa5 21-Sep-2017 Eugen-Alexandru Virtan <eugen.virtan@couchbase.com>

MB-26047:[1] Add new std::atomic wrapper class for <chrono> durations

Introduce new std::atomic wrapper, cb::AtomicDuration, which allows
atomic operations to be performed on std::chrono

MB-26047:[1] Add new std::atomic wrapper class for <chrono> durations

Introduce new std::atomic wrapper, cb::AtomicDuration, which allows
atomic operations to be performed on std::chrono:duration types. It
aims to replace uses of std::atomic<hrtime_t>.

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

show more ...


# 45f4e560 28-Aug-2017 Trond Norbye <trond.norbye@gmail.com>

noxexcept is part of C++11

We don't need to do compile time checks for that

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

noxexcept is part of C++11

We don't need to do compile time checks for that

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

show more ...


# a06044f3 07-Aug-2017 James Harrison <00jamesh@gmail.com>

Add cb_malloc_usable_size and interpose malloc_usable_size

As we have a global new replacement, libraries could end up calling the
system malloc_usable_size (if present) with a pointer t

Add cb_malloc_usable_size and interpose malloc_usable_size

As we have a global new replacement, libraries could end up calling the
system malloc_usable_size (if present) with a pointer to memory
allocated by JEMalloc.

This was first noted when testing with RocksDB, but would safeguard
against it cropping up elsewhere.

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

show more ...


# e142646d 17-Aug-2017 Trond Norbye <trond.norbye@gmail.com>

Remove unused library extmeta

We're no longer using this extmeta library so it may be nuked

Change-Id: Iec7b31b3e67a210828544b4c2e470ba7f63eba05
Reviewed-on: http://review.couch

Remove unused library extmeta

We're no longer using this extmeta library so it may be nuked

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

show more ...


# 010e7126 04-Aug-2017 Trond Norbye <trond.norbye@gmail.com>

Make pipe a header-only-impl

As part of trying to figure out the performance regression
when using the pipe instead of the fixed buffer let the
compiler inline all calls to the metho

Make pipe a header-only-impl

As part of trying to figure out the performance regression
when using the pipe instead of the fixed buffer let the
compiler inline all calls to the methods (to make it
result in pointer arithmetic without all of the function
calls).

At this point I should have made it a template to allow
the caller to get the type needed ;-) but I don't want
to refactor the code..

Change-Id: I37f4efdbff68830d5c0ba386b39efe29e372d4c7
Reviewed-on: http://review.couchbase.org/81902
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Will Gardner <willg@rdner.io>

show more ...


# c9135ff7 23-Jun-2017 Jim Walker <jim@couchbase.com>

Add variadic template extension to std::bitset for a cleaner initialise

Enables the cleaner creation of bitsets from enums

e.g.

enum states {a, b, c, d};

You c

Add variadic template extension to std::bitset for a cleaner initialise

Enables the cleaner creation of bitsets from enums

e.g.

enum states {a, b, c, d};

You can create bitset to represent a set of states:

cb::bitset<4, states> permittedStates(a, c);

And use std::bitset functionality:

std::cout << permittedStates << "\n"; // 0101
if (permittedStates.test(a)) {...}

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

show more ...


# e1a50e43 14-Jun-2017 Trond Norbye <trond.norbye@gmail.com>

Add tighter integration with valgrind for cb::Pipe

The underlying backing store for the pipe is allocated in one
continuous chunk, and by default valgrind detects any buffer
over/und

Add tighter integration with valgrind for cb::Pipe

The underlying backing store for the pipe is allocated in one
continuous chunk, and by default valgrind detects any buffer
over/underflow on that buffer.

We do however have strict requirements on where we're allowed
to read/write in the buffer, and valgrind allows for a tighter
integration by us telling it if the memory should be readable
or not.

This patch makes sure that when you try to write data into
the buffer you may _only_ access the portion of the buffer
where new data may be inserted. At any other time, the client
may access the portion of the data previously written into
the buffer.

Change-Id: Id22b93d6b229938816fbe1e06bdc757a0d6d7992
Reviewed-on: http://review.couchbase.org/79475
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Reviewed-by: Will Gardner <willg@rdner.io>

show more ...


# 2c62e727 06-Jun-2017 Trond Norbye <trond.norbye@gmail.com>

MB-24634: Add cb::Pipe

The Pipe class is a buffered pipe where you may insert data in one
end, and read it back out from the other (like a normal pipe).

Instead of using customi

MB-24634: Add cb::Pipe

The Pipe class is a buffered pipe where you may insert data in one
end, and read it back out from the other (like a normal pipe).

Instead of using customized iosteram buffers and allows for that kind
of use, this class provides a "produce" method and a "consume" method
where you provide a callback which receives the memory area it may operate
on so that it can perform more optimal IO by populating the buffer
directly:

pipe.produce([&sock](void* data, size_t size) -> ssize_t {
return cb::net::recv(sock, data, size, 0);
});

And now you may use the data by calling:

pipe.consume([](const void* data, size_t size) -> ssize_t {
// do whatever we want with the data
return nbytes;
});

The return value from the consume method is the number of bytes you've
consumed (so that they may be dropped from the pipe). It means that if
you just want to look at the bytes you would return 0, and they would
still be present the next time you invoke the consume method.

Implementation details:

The Pipe is implemented by using allocating an underlying buffer of a
fixed size. The caller may grow this buffer by calling ensureCapacity,
which would:

* return immediately if available segment at the end is big enough
* pack the buffer if the free segment at the end and the beginning
is big enough
* reallocate the underlying buffer if we need more space

As you can see from the above the last two bullets would invalidate
all addresses previously provided to the "produce" and "consume" methods
which means that you _cannot_ keep pointers into this buffer and use
ensureCapacity.

Data written to the pipe is always put at the end of the allocated
buffer, and the write_head is moved forward. Data is always read from
the read_head, and once consumed the read head is moved forward. Whenever
the read_head catch up with the write_head they're both set to 0 (the
beginning of the buffer).

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

show more ...


12345