History log of /6.0.3/phosphor/CMakeLists.txt (Results 1 - 25 of 37)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v5.5.0
# 195e116e 08-May-2018 Dave Rigby <daver@couchbase.com>

Use Complete event type for scoped events

Use the new Complete trace type to implement the scoped (TRACE_EVENT*
/ TRACE_FUNCTION*) event macros. This reduces the number of TraceEvent

Use Complete event type for scoped events

Use the new Complete trace type to implement the scoped (TRACE_EVENT*
/ TRACE_FUNCTION*) event macros. This reduces the number of TraceEvent
objects needed for these events by half; well worth the modest (1
word) increase in size to support Complete events (needed to add 64bit
duration field).

Implemented by adding a RAII-style ScopedEventGuard class; which
captures the arguments for a trace event, and if enabled logs the
event in it's destructor.

Note this change required the removal of the TRACE_EVENT() (varargs)
macro; as we now need to capture the types of the args (as the call to
logEvent() happens at the end of the scope).

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

show more ...


Revision tags: v5.0.0
# bcc011a6 30-Jul-2017 Will Gardner <willg@rdner.io>

Remove Sentinel

Removes the Sentinel now that it has been replaced by the ChunkLock.

Also renames/updates locations that once referred to the ChunkLock
(like config options).

Remove Sentinel

Removes the Sentinel now that it has been replaced by the ChunkLock.

Also renames/updates locations that once referred to the ChunkLock
(like config options).

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

show more ...


# 5c7d9532 20-Jan-2017 WillGardner <willg@rdner.io>

Introduce ChunkLock as a Sentinel replacement

This adds phosphor::ChunkLock as a replacement to phosphor::Sentinel
in an upcoming patch. It uses a different name for two reasons:

Introduce ChunkLock as a Sentinel replacement

This adds phosphor::ChunkLock as a replacement to phosphor::Sentinel
in an upcoming patch. It uses a different name for two reasons:

a) The old name could be confused with a sentinel value
b) It allows replacing Sentinel over multiple patches

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

show more ...


# 1fae1f13 17-Jan-2017 WillGardner <willg@rdner.io>

Add stats for Trace Buffers

Change-Id: Idd7b98e90703544c50294a96c4a3f2b1070ccd4c
Reviewed-on: http://review.couchbase.org/72111
Tested-by: buildbot <build@couchbase.com>
Reviewed

Add stats for Trace Buffers

Change-Id: Idd7b98e90703544c50294a96c4a3f2b1070ccd4c
Reviewed-on: http://review.couchbase.org/72111
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


# 4dfef1b5 05-Oct-2016 Dave Rigby <daver@couchbase.com>

Ensure memory is allocated & freed using same runtime

On Windows is it not safe in the general case to allocate memory in
one binary and deallocate from a different binary - for example

Ensure memory is allocated & freed using same runtime

On Windows is it not safe in the general case to allocate memory in
one binary and deallocate from a different binary - for example new an
object in the main executable and delete it in a DLL. This is because
each executable can link to a different malloc implementation.

Typically this occurs if a different version of the CRT is used, but
in the case of phosphor's use in Couchbase Server this occurs when
allocation are made from memcached.exe (which uses cbmalloc as it
links libplatform) and deallocations are done from phosphor.dll (which
uses the system malloc).

The effect of this is hard-to-track down memory errors, or (if you're
luckier) crashes on free.

To solve this we need to ensure that any objects which are passed over
the phosphor DLL interface have matching allocation / free from one
side or the other. The following existing patterns breaks this rule,
and need to be fixed:

1. Constructors and destructors for objects which own memory must both
be inline or both be non-inline, not mixed. This applies to both
explicitly-declared con/destructors, and to compiler-generated
defaults (which are implicitly inline). The problem is that the
inlined construtor/destuctor will allocate memory using the caller
executable's malloc/free, whereas the non-inline will use
phosphor's. See: TraceConfig, JSONExport.

2. Non-const STL objects should not be returned from phosphor to the
executable. This is similar to (1) - the STL object would have been
allocated in phosphor, but may be freed (or resized) in the main
executable. Solution is to either make const (so exe cannot free
them), or create a wrapper class which we can ensure allocation and
deletion occurs in the same place. See: phosphor::String.

2b. Essentially the same issue as (2) - when passing callback objects
into phosphor ensure that phosphor doesn't delete them as it didn't
allocate the memory. This was an issue using std::function for
callbacks, as the caller creates an object of this type, and then
phosphor deletes it). Solution is to instead use an abstract base
class for the Callback, and have the concrete subclasses declares
all constructors/destructors non-inline. To allow multiple entities
to refer to a callback (without copying it), use shared_ptr to own
it. See: TracingStoppedCallback

Additionally, to defend against such issues in future we link the phosphor
unit tests with libplatform (and hence cbmalloc), so the unit tests run in
this mixed-mode environment.

Change-Id: I37ffcc8c1b0ffc06106bf21a11479f67df2ff0b1
Reviewed-on: http://review.couchbase.org/68398
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Jim Walker <jim@couchbase.com>

show more ...


# a2202554 12-Sep-2016 Will Gardner <willg@rdner.io>

Add support for short inlined dynamic strings

Phosphor cannot generally support dynamic strings
which can be rather restrictive with the types
it can support.

This patch int

Add support for short inlined dynamic strings

Phosphor cannot generally support dynamic strings
which can be rather restrictive with the types
it can support.

This patch introduces a new argument type
'inline_zstring' which can be constructed from
a std::string or char* via the PHOSPHOR_INLINE_STR
macro which will store up to the first 8 bytes of
the given string within its internal storage.

Change-Id: Iccf350972b1ceee709803f7de8807183c09ad02a
Reviewed-on: http://review.couchbase.org/67575
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: buildbot <build@couchbase.com>

show more ...


# 81f45f5d 30-Aug-2016 Will Gardner <will.gardner@couchbase.com>

MB-20732 Refactor trace categories, names, arguments into a single object

This patch refactors the trace categories and names for each tracepoint
to be held in a single static object whi

MB-20732 Refactor trace categories, names, arguments into a single object

This patch refactors the trace categories and names for each tracepoint
to be held in a single static object which allows for a reduction in
size of the TraceEvent.

It also moves the trace argument definitions to this tracepoint object
instead of being hardcoded in the serialisation code which will allow
for custom argument names to be added in a future patch.

This readds a previous patch (1c64b10cd4c68d104c6aa5f5d3ec025b9fad93cf)
which was reverted as it wasn't quite threadsafe.

Change-Id: I23c24bdacd950884e599e9e468ba5b2889e49600
Reviewed-on: http://review.couchbase.org/67203
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: buildbot <build@couchbase.com>

show more ...


# cd80f4d2 31-Aug-2016 Will Gardner <will.gardner@couchbase.com>

Revert "MB-20732 Refactor trace categories, names, arguments into a single object"

This reverts commit 1c64b10cd4c68d104c6aa5f5d3ec025b9fad93cf.

Change-Id: I7de005a240dad708754d1673

Revert "MB-20732 Refactor trace categories, names, arguments into a single object"

This reverts commit 1c64b10cd4c68d104c6aa5f5d3ec025b9fad93cf.

Change-Id: I7de005a240dad708754d167382374e888597ebb8
Reviewed-on: http://review.couchbase.org/67196
Reviewed-by: Will Gardner <will.gardner@couchbase.com>
Tested-by: Will Gardner <will.gardner@couchbase.com>

show more ...


# 1c64b10c 30-Aug-2016 Will Gardner <will.gardner@couchbase.com>

MB-20732 Refactor trace categories, names, arguments into a single object

This patch refactors the trace categories and names for each tracepoint
to be held in a single static object whi

MB-20732 Refactor trace categories, names, arguments into a single object

This patch refactors the trace categories and names for each tracepoint
to be held in a single static object which allows for a reduction in
size of the TraceEvent.

It also moves the trace argument definitions to this tracepoint object
instead of being hardcoded in the serialisation code which will allow
for custom argument names to be added in a future patch.

Change-Id: Icf58325f02d10fd8d27c17b4a55844205715bddb
Reviewed-on: http://review.couchbase.org/67163
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: buildbot <build@couchbase.com>

show more ...


# f84c4988 24-Aug-2016 Will Gardner <will.gardner@couchbase.com>

Add a TraceContext object to encapsulate all info for a trace

This commit introduces a `TraceContext` to allow for adding more
info such as thread names, start/stop times, trace config t

Add a TraceContext object to encapsulate all info for a trace

This commit introduces a `TraceContext` to allow for adding more
info such as thread names, start/stop times, trace config to
trace exports without incurring another API break.

Change-Id: Ie249f27721b4ad34c9ad5ad9537802bfd65b008a
Reviewed-on: http://review.couchbase.org/67020
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: buildbot <build@couchbase.com>

show more ...


# 54833165 18-Aug-2016 Will Gardner <will.gardner@couchbase.com>

Add header files to library build target

CLion doesn't detect header files as being part of a project
unless they're part of a target so this patch adds them to the
library target.

Add header files to library build target

CLion doesn't detect header files as being part of a project
unless they're part of a target so this patch adds them to the
library target.

Change-Id: I2669daee31f75617f7a6c8bf8875a312c8665aae
Reviewed-on: http://review.couchbase.org/66864
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


# 1a94fd0f 18-Aug-2016 Will Gardner <will.gardner@couchbase.com>

Move tracing config into separate files from TraceLog

Change-Id: Ia18a4d810d16fffb6b963b967b52a051e6c54d26
Reviewed-on: http://review.couchbase.org/66863
Tested-by: buildbot <build@c

Move tracing config into separate files from TraceLog

Change-Id: Ia18a4d810d16fffb6b963b967b52a051e6c54d26
Reviewed-on: http://review.couchbase.org/66863
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


# 2a7661ac 11-Aug-2016 Will Gardner <will.gardner@couchbase.com>

Install phosphor library

If phosphor isn't installed then weird stuff can happen when a
module which links against phosphor is loaded without phosphor
already being loaded (e.g if ep

Install phosphor library

If phosphor isn't installed then weird stuff can happen when a
module which links against phosphor is loaded without phosphor
already being loaded (e.g if ep-engine is linked against phosphor
but memcached isn't).

Change-Id: I86ebd029b6471018a3e33d323337d2bfbeb4e457
Reviewed-on: http://review.couchbase.org/66693
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: buildbot <build@couchbase.com>

show more ...


# f3aee42d 09-Aug-2016 Will Gardner <will.gardner@couchbase.com>

Add ability to disable compilation of trace macros

This patch allows for disabling the trace macros through the
use of the compiler definition:

-DPHOSPHOR_DISABLED=1

Add ability to disable compilation of trace macros

This patch allows for disabling the trace macros through the
use of the compiler definition:

-DPHOSPHOR_DISABLED=1

It additionally initialises the CMake variable `phosphor_LIB` to
be equal to 'phosphor', this can be overridden and set to e.g. the
empty string, '', to allow for conditional linking of the
library.

Change-Id: I88c98a2d4f4f0a1af7c38fbf22dcbb1fb706011e
Reviewed-on: http://review.couchbase.org/66603
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


# 0a44cfbe 01-Aug-2016 Will Gardner <will.gardner@couchbase.com>

MB-20359 Convert phosphor to a shared library

The purpose of this patch is to ensure that multiple components running
within the same process are all referring to the same singleton inst

MB-20359 Convert phosphor to a shared library

The purpose of this patch is to ensure that multiple components running
within the same process are all referring to the same singleton instance
of phosphor::TraceLog. For example with memcached and ep-engine, as
ep-engine does not link against the memcached daemon it must
independantly link with phosphor which would not have the desired effect
with a static library.

Because Windows cannot support exported thread-local symbols this patch
also de-inlines the ChunkTenant selection code. It also moves the
definition of the thread-id cache variable to be inlined so that it does
not need to be exported from the shared library.

Change-Id: Ic9ecdea7c9b22a3684fed91b7f98a833d6fed1a4
Reviewed-on: http://review.couchbase.org/66360
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


# 1abdf804 29-Jul-2016 Will Gardner <will.gardner@couchbase.com>

Include CTest instead of enabling testing

By including CTest this allows valgrind to run via ctest as
otherwise ctest can't find "DartConfiguration.tcl".

Change-Id: I8a5cae33abc

Include CTest instead of enabling testing

By including CTest this allows valgrind to run via ctest as
otherwise ctest can't find "DartConfiguration.tcl".

Change-Id: I8a5cae33abc6d1dd5bea275297a482e0468389e2
Reviewed-on: http://review.couchbase.org/66310
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Will Gardner <will.gardner@couchbase.com>

show more ...


# b8227ae0 28-Jun-2016 Will Gardner <will.gardner@couchbase.com>

Add a Category Registry for managing enabling/disabling categories


# b8180210 24-Jun-2016 Will Gardner <will.gardner@couchbase.com>

Add Dvyukov's 'lockless' MPMC Queue

Currently replacing a chunk is a very expensive operation, by adding a lockless MPMC queue we can move towards making the chunk replacement process 'lock

Add Dvyukov's 'lockless' MPMC Queue

Currently replacing a chunk is a very expensive operation, by adding a lockless MPMC queue we can move towards making the chunk replacement process 'lock free'.

show more ...


# d5ab7d09 22-Jun-2016 Will Gardner <will.gardner@couchbase.com>

Add chunk replacement bench and chunk size tracing benchmark


# 5c73097b 21-Jun-2016 Will Gardner <will.gardner@couchbase.com>

Add an example usage of Phosphor


# c6b80bac 16-Jun-2016 Will Gardner <will.gardner@couchbase.com>

Add a reference persist to file on stop callback


# 692ecaa3 13-Jun-2016 Will Gardner <will.gardner@couchbase.com>

Add initial JSON Export tool


# 0b3804d6 06-Jun-2016 Will Gardner <will.gardner@couchbase.com>

Add thread platform abstraction and use it


# 8476e923 25-May-2016 Will Gardner <will.gardner@couchbase.com>

Add Google Benchmark and initial benchmark example


# 0aac3aa9 25-May-2016 Will Gardner <will.gardner@couchbase.com>

Rename polyfill.h to make_unique.h and move utils to a subdirectory


12