diff options
author | Alexander Smirnov <alex@ydb.tech> | 2025-03-29 00:51:38 +0000 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2025-03-29 00:51:38 +0000 |
commit | bff5fedf8c631258ee646bc79800a0d15bdbb805 (patch) | |
tree | 1181c87d223be6a6459d4148457b0e6b81291644 /library/cpp | |
parent | 5098c625cfafb0b790d23f6072e723afb0342cd7 (diff) | |
parent | 00492e3658dbb635ecd55d9cceeef69e0d157d83 (diff) | |
download | ydb-bff5fedf8c631258ee646bc79800a0d15bdbb805.tar.gz |
Merge branch 'rightlib' into merge-libs-250329-0050
Diffstat (limited to 'library/cpp')
-rw-r--r-- | library/cpp/coroutine/engine/coroutine_ut.cpp | 2 | ||||
-rw-r--r-- | library/cpp/execprofile/profile.cpp | 16 | ||||
-rw-r--r-- | library/cpp/logger/backend_creator.cpp | 2 | ||||
-rw-r--r-- | library/cpp/tld/tlds-alpha-by-domain.txt | 2 |
4 files changed, 11 insertions, 11 deletions
diff --git a/library/cpp/coroutine/engine/coroutine_ut.cpp b/library/cpp/coroutine/engine/coroutine_ut.cpp index de56d0ed2b..656e3943c0 100644 --- a/library/cpp/coroutine/engine/coroutine_ut.cpp +++ b/library/cpp/coroutine/engine/coroutine_ut.cpp @@ -112,7 +112,7 @@ void TCoroTest::TestException() { auto f2 = [&unc, &f2run](TCont*) { f2run = true; - unc = std::uncaught_exception(); + unc = std::uncaught_exceptions(); // check segfault try { diff --git a/library/cpp/execprofile/profile.cpp b/library/cpp/execprofile/profile.cpp index 52cf658ba2..4ce75c1d6f 100644 --- a/library/cpp/execprofile/profile.cpp +++ b/library/cpp/execprofile/profile.cpp @@ -25,6 +25,8 @@ #include <util/stream/file.h> #include <util/string/util.h> #include <util/system/datetime.h> +#include <util/system/guard.h> +#include <util/system/spinlock.h> // This class sets SIGPROF handler and captures instruction pointer in it. class TExecutionSampler : TNonCopyable { @@ -89,7 +91,7 @@ public: stats.SavedSamples = Samples; stats.DroppedSamples = AtomicGet(DroppedSamples); stats.SearchSkipCount = SearchSkipCount; - AtomicUnlock(&WriteFlag); + WriteFlag.Release(); Sort(hits.begin(), hits.end(), TCompareFirst()); @@ -99,7 +101,7 @@ public: void ResetStats() { WaitForWriteFlag(); Clear(); - AtomicUnlock(&WriteFlag); + WriteFlag.Release(); } private: @@ -116,7 +118,6 @@ private: TExecutionSampler() : Started(false) , Ips(SZ) - , WriteFlag(0) , DroppedSamples(0) , Samples(0) , UniqueSamples(0) @@ -146,7 +147,7 @@ private: void WaitForWriteFlag() { // Wait for write flag to be reset ui32 delay = 100; - while (!AtomicTryLock(&WriteFlag)) { + while (!WriteFlag.TryAcquire()) { usleep(delay); delay += delay; delay = Min(delay, (ui32)5000); @@ -157,9 +158,8 @@ private: // Check if the handler on another thread is in the process of adding a sample // If this is the case, we just drop the current sample as this should happen // rarely. - if (AtomicTryLock(&WriteFlag)) { + if (TTryGuard guard(WriteFlag); guard.WasAcquired()) { AddSample(rip); - AtomicUnlock(&WriteFlag); } else { AtomicIncrement(DroppedSamples); } @@ -243,7 +243,7 @@ private: void Clear() { - Y_ASSERT(WriteFlag == 1); + Y_ASSERT(WriteFlag.IsLocked()); for (size_t i = 0; i < SZ; ++i) { Ips[i] = std::make_pair((void*)nullptr, (size_t)0); @@ -262,7 +262,7 @@ private: Ips; // The hash table storing addresses and their hitcounts // TODO: on a big multiproc cache line false sharing by the flag and count might become an issue - TAtomic WriteFlag; // Is used to syncronize access to the hash table + TSpinLock WriteFlag; // Is used to syncronize access to the hash table TAtomic DroppedSamples; // "dropped sample" count will show how many times // a sample was dropped either because of write conflict // or because of the hash table had become too filled up diff --git a/library/cpp/logger/backend_creator.cpp b/library/cpp/logger/backend_creator.cpp index ea430edb83..f239fa57e2 100644 --- a/library/cpp/logger/backend_creator.cpp +++ b/library/cpp/logger/backend_creator.cpp @@ -2,7 +2,7 @@ #include "stream.h" #include "uninitialized_creator.h" #include <util/system/yassert.h> -#include <util/stream/debug.h> +#include <util/stream/output.h> #include <util/stream/output.h> diff --git a/library/cpp/tld/tlds-alpha-by-domain.txt b/library/cpp/tld/tlds-alpha-by-domain.txt index b1cec7b2a6..edda68377f 100644 --- a/library/cpp/tld/tlds-alpha-by-domain.txt +++ b/library/cpp/tld/tlds-alpha-by-domain.txt @@ -1,4 +1,4 @@ -# Version 2025032500, Last Updated Tue Mar 25 07:07:01 2025 UTC +# Version 2025032800, Last Updated Fri Mar 28 07:07:01 2025 UTC AAA AARP ABB |