summaryrefslogtreecommitdiff
path: root/absl/strings/BUILD.bazel
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2021-04-22 04:30:35 -0700
committerGravatar Dino Radaković <dinor@google.com>2021-04-22 09:26:52 -0700
commite38e1aae3866a4ae3a41ccb38d3f05618ea30ca4 (patch)
tree72a8ed083e3153a908a1c5fe1b3b506212c4bb14 /absl/strings/BUILD.bazel
parent1ae9b71c474628d60eb251a3f62967fe64151bb2 (diff)
Export of internal Abseil changes
-- 9e0df3dd23da17cd0ff75c93c1493a858032639c by Martijn Vels <mvels@google.com>: Prep work for changing Cordz instrumentation Create CordzInfo::TrackCord() and CordzInfo::MaybeTrackCord() methods on InlineData This follows a suggestion from kfm@ to move where possible Cordz logic out of Cord and Cord::InlineRep, which we can now that InlineData provides us the abstraction of Cords internal data. PiperOrigin-RevId: 369844310 -- 45f39709033bd3bc09fa1a7880a5b3c9eaa617c7 by Abseil Team <absl-team@google.com>: Fix dependence on C++20 constexpr default construction of std::atomic. PiperOrigin-RevId: 369745251 -- 195ae230963c95068406ab0e73b4e711b5f3cd62 by Martijn Vels <mvels@google.com>: Reduce the cost of 'SetCordRep()` This change inlines SetCordRep(), which is currently two stores and a branch, going forward a naked store. AssertHeld is only enforced for debug builds. The intention here is not to reduce the 'actual' (or 'self') cost of SetCordRep() as it should only be called for sampled cords, but to reduce the cost of a branch and out of line call at the call site. The compiler can now 'perfectly inline' the single branch / store. PiperOrigin-RevId: 369696265 -- d722199ed69d413994740624159ac7bd001a9219 by Martijn Vels <mvels@google.com>: Add kDefaultInit initialization This avoids double store on init PiperOrigin-RevId: 369655217 -- 3499aed79e6cc12ce36277063ec37991bba0cccd by Martijn Vels <mvels@google.com>: Introduce CordzUpdateScope PiperOrigin-RevId: 369491326 -- 325c1bc99c7d1aeca7bd1273e51a0900b6faf731 by Abseil Team <absl-team@google.com>: make unary and logical operators constexpr PiperOrigin-RevId: 369476773 -- ad3bed3dea5e5d7d281ff36ee786f802630c3728 by Martijn Vels <mvels@google.com>: Add LOCKABLE attribute to CordzInfo PiperOrigin-RevId: 369476772 GitOrigin-RevId: 9e0df3dd23da17cd0ff75c93c1493a858032639c Change-Id: I00e2859328fe8da46d2e04d3f07dfe70ec6cb1f5
Diffstat (limited to 'absl/strings/BUILD.bazel')
-rw-r--r--absl/strings/BUILD.bazel29
1 files changed, 29 insertions, 0 deletions
diff --git a/absl/strings/BUILD.bazel b/absl/strings/BUILD.bazel
index 95ed0868..874dd390 100644
--- a/absl/strings/BUILD.bazel
+++ b/absl/strings/BUILD.bazel
@@ -330,6 +330,7 @@ cc_library(
":cordz_functions",
":cordz_info",
":cordz_statistics",
+ ":cordz_update_scope",
":cordz_update_tracker",
":internal",
":str_format",
@@ -366,6 +367,7 @@ cc_library(
copts = ABSL_DEFAULT_COPTS,
deps = [
":cord_internal",
+ ":cordz_functions",
":cordz_handle",
":cordz_statistics",
":cordz_update_tracker",
@@ -378,6 +380,33 @@ cc_library(
)
cc_library(
+ name = "cordz_update_scope",
+ hdrs = ["internal/cordz_update_scope.h"],
+ copts = ABSL_DEFAULT_COPTS,
+ deps = [
+ ":cord_internal",
+ ":cordz_info",
+ ":cordz_update_tracker",
+ "//absl/base:config",
+ "//absl/base:core_headers",
+ ],
+)
+
+cc_test(
+ name = "cordz_update_scope_test",
+ srcs = ["internal/cordz_update_scope_test.cc"],
+ copts = ABSL_DEFAULT_COPTS,
+ deps = [
+ ":cord_internal",
+ ":cordz_info",
+ ":cordz_update_scope",
+ ":cordz_update_tracker",
+ "//absl/base:config",
+ "@com_google_googletest//:gtest_main",
+ ],
+)
+
+cc_library(
name = "cordz_sample_token",
srcs = ["internal/cordz_sample_token.cc"],
hdrs = ["internal/cordz_sample_token.h"],