Skip to content

Commit

Permalink
Refactor a few duplicate comments
Browse files Browse the repository at this point in the history
Summary: Applying the comment refactor from D67739158 as separate diff, per review feedback request

Reviewed By: yfeldblum

Differential Revision: D67971466

fbshipit-source-id: 78bc8e5bec65a33e7ed5cdb5e2f13e35d4b1c663
  • Loading branch information
Stefan Larimore authored and facebook-github-bot committed Jan 16, 2025
1 parent d5f364e commit 7540952
Showing 1 changed file with 6 additions and 22 deletions.
28 changes: 6 additions & 22 deletions third-party/folly/src/folly/logging/xlog.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ FOLLY_EXPORT FOLLY_ALWAYS_INLINE bool xlogEveryNImpl(size_t n) {
* Similar to XLOG(...) except only log a message every @param n
* invocations, approximately.
*
* The internal counter is process-global and threadsafe but, to
* to avoid the performance degradation of atomic-rmw operations,
* The internal counter is process-global and threadsafe, but to
* avoid the performance degradation of atomic-rmw operations,
* increments are non-atomic. Some increments may be missed under
* contention, leading to possible over-logging or under-logging
* effects.
Expand All @@ -242,11 +242,7 @@ FOLLY_EXPORT FOLLY_ALWAYS_INLINE bool xlogEveryNImpl(size_t n) {
* Similar to XLOGF(...) except only log a message every @param n
* invocations, approximately.
*
* The internal counter is process-global and threadsafe but, to
* to avoid the performance degradation of atomic-rmw operations,
* increments are non-atomic. Some increments may be missed under
* contention, leading to possible over-logging or under-logging
* effects.
* See concurrency discussion for XLOG_EVERY_N which applies here as well.
*/
#define XLOGF_EVERY_N(level, n, fmt, ...) \
XLOGF_IF( \
Expand All @@ -263,11 +259,7 @@ FOLLY_EXPORT FOLLY_ALWAYS_INLINE bool xlogEveryNImpl(size_t n) {
* invocations, approximately, and if the specified condition predicate
* evaluates to true.
*
* The internal counter is process-global and threadsafe but, to
* to avoid the performance degradation of atomic-rmw operations,
* increments are non-atomic. Some increments may be missed under
* contention, leading to possible over-logging or under-logging
* effects.
* See concurrency discussion for XLOG_EVERY_N which applies here as well.
*/
#define XLOG_EVERY_N_IF(level, cond, n, ...) \
XLOG_IF( \
Expand All @@ -283,11 +275,7 @@ FOLLY_EXPORT FOLLY_ALWAYS_INLINE bool xlogEveryNImpl(size_t n) {
* Similar to XLOG(...) except it logs a message if the condition predicate
* evalutes to true or approximately every @param n invocations
*
* The internal counter is process-global and threadsafe but, to
* to avoid the performance degradation of atomic-rmw operations,
* increments are non-atomic. Some increments may be missed under
* contention, leading to possible over-logging or under-logging
* effects.
* See concurrency discussion for XLOG_EVERY_N which applies here as well.
*/
#define XLOG_EVERY_N_OR(level, cond, n, ...) \
XLOG_IF( \
Expand All @@ -304,11 +292,7 @@ FOLLY_EXPORT FOLLY_ALWAYS_INLINE bool xlogEveryNImpl(size_t n) {
* invocations, approximately, and if the specified condition predicate
* evaluates to true.
*
* The internal counter is process-global and threadsafe but, to
* to avoid the performance degradation of atomic-rmw operations,
* increments are non-atomic. Some increments may be missed under
* contention, leading to possible over-logging or under-logging
* effects.
* See concurrency discussion for XLOG_EVERY_N which applies here as well.
*/
#define XLOGF_EVERY_N_IF(level, cond, n, fmt, ...) \
XLOGF_IF( \
Expand Down

0 comments on commit 7540952

Please sign in to comment.