diff options
author | qkrorlqr <qkrorlqr@yandex-team.ru> | 2022-02-10 16:47:21 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:21 +0300 |
commit | eec632e483ae34bc211138c67434b1e0e6054ced (patch) | |
tree | 9814fbd1c3effac9b8377c5d604b367b14e2db55 /library/cpp/lwtrace | |
parent | 9b89266638b10d40309e31dcb7caa2fc52b2aefd (diff) | |
download | ydb-eec632e483ae34bc211138c67434b1e0e6054ced.tar.gz |
Restoring authorship annotation for <qkrorlqr@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/lwtrace')
-rw-r--r-- | library/cpp/lwtrace/log_shuttle.h | 32 | ||||
-rw-r--r-- | library/cpp/lwtrace/trace.cpp | 4 |
2 files changed, 18 insertions, 18 deletions
diff --git a/library/cpp/lwtrace/log_shuttle.h b/library/cpp/lwtrace/log_shuttle.h index 49d329c0c21..729a38615fe 100644 --- a/library/cpp/lwtrace/log_shuttle.h +++ b/library/cpp/lwtrace/log_shuttle.h @@ -5,8 +5,8 @@ #include <library/cpp/lwtrace/protos/lwtrace.pb.h> -#include <util/system/spinlock.h> - +#include <util/system/spinlock.h> + namespace NLWTrace { template <class TDepot> class TRunLogShuttleActionExecutor; @@ -51,7 +51,7 @@ namespace NLWTrace { TExecutor* Executor; bool Ignore = false; size_t MaxTrackLength; - TAdaptiveLock Lock; + TAdaptiveLock Lock; TAtomic ForkFailed = 0; public: @@ -156,21 +156,21 @@ namespace NLWTrace { template <class TDepot> bool TLogShuttle<TDepot>::DoAddProbe(TProbe* probe, const TParams& params, ui64 timestamp) { - with_lock (Lock) { - if (TrackLog.Items.size() >= MaxTrackLength) { - TrackLog.Truncated = true; - return true; - } - TrackLog.Items.emplace_back(); - TTrackLog::TItem* item = &TrackLog.Items.back(); - item->ThreadId = 0; // TODO[serxa]: check if it is fast to run TThread::CurrentThreadId(); - item->Probe = probe; - if ((item->SavedParamsCount = probe->Event.Signature.ParamCount) > 0) { - probe->Event.Signature.CloneParams(item->Params, params); - } + with_lock (Lock) { + if (TrackLog.Items.size() >= MaxTrackLength) { + TrackLog.Truncated = true; + return true; + } + TrackLog.Items.emplace_back(); + TTrackLog::TItem* item = &TrackLog.Items.back(); + item->ThreadId = 0; // TODO[serxa]: check if it is fast to run TThread::CurrentThreadId(); + item->Probe = probe; + if ((item->SavedParamsCount = probe->Event.Signature.ParamCount) > 0) { + probe->Event.Signature.CloneParams(item->Params, params); + } item->TimestampCycles = timestamp ? timestamp : GetCycleCount(); } - + return true; } diff --git a/library/cpp/lwtrace/trace.cpp b/library/cpp/lwtrace/trace.cpp index 3812ea2d5b6..3c974c85a01 100644 --- a/library/cpp/lwtrace/trace.cpp +++ b/library/cpp/lwtrace/trace.cpp @@ -548,8 +548,8 @@ namespace NLWTrace { TArgumentDescription arg0 = arguments.at(0); TArgumentDescription arg1 = arguments.at(1); - const char* tName0 = arg0.ParamIdx == size_t(-1) ? nullptr : probe->Event.Signature.ParamTypes[arg0.ParamIdx]; - const char* tName1 = arg1.ParamIdx == size_t(-1) ? nullptr : probe->Event.Signature.ParamTypes[arg1.ParamIdx]; + const char* tName0 = arg0.ParamIdx == size_t(-1) ? nullptr : probe->Event.Signature.ParamTypes[arg0.ParamIdx]; + const char* tName1 = arg1.ParamIdx == size_t(-1) ? nullptr : probe->Event.Signature.ParamTypes[arg1.ParamIdx]; TString var0 = op.GetArgument(0).GetVariable(); TString var1 = op.GetArgument(1).GetVariable(); |