aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/execprofile/profile.cpp
diff options
context:
space:
mode:
authoragorodilov <agorodilov@yandex-team.ru>2022-02-10 16:47:09 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:09 +0300
commit7a4979e6211c3e78c7f9041d4a9e5d3405343c36 (patch)
tree9e9943579e5a14679af7cd2cda3c36d8c0b775d3 /library/cpp/execprofile/profile.cpp
parent676340c42e269f3070f194d160f42a83a10568d4 (diff)
downloadydb-7a4979e6211c3e78c7f9041d4a9e5d3405343c36.tar.gz
Restoring authorship annotation for <agorodilov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/execprofile/profile.cpp')
-rw-r--r--library/cpp/execprofile/profile.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/library/cpp/execprofile/profile.cpp b/library/cpp/execprofile/profile.cpp
index d05de20203f..36daf74cd2e 100644
--- a/library/cpp/execprofile/profile.cpp
+++ b/library/cpp/execprofile/profile.cpp
@@ -38,7 +38,7 @@ public:
// NOTE: There is no synchronization here as the instance is supposed to be
// created on the main thread.
static TExecutionSampler* Instance() {
- if (SInstance == nullptr) {
+ if (SInstance == nullptr) {
SInstance = new TExecutionSampler();
}
@@ -66,21 +66,21 @@ public:
void Stop(TSampleVector& sampleVector, TStats& stats) {
// Reset signal handler and timer
if (Started) {
- setitimer(ITIMER_PROF, &OldTimerValue, nullptr);
+ setitimer(ITIMER_PROF, &OldTimerValue, nullptr);
sleep(1);
}
WaitForWriteFlag();
if (Started) {
- sigaction(SIGPROF, &OldSignalHandler, nullptr);
+ sigaction(SIGPROF, &OldSignalHandler, nullptr);
Started = false;
}
TExecutionSampler::TSampleVector hits;
hits.reserve(Samples);
for (size_t i = 0; i < SZ; ++i) {
- if (Ips[i].first != nullptr) {
+ if (Ips[i].first != nullptr) {
hits.push_back(Ips[i]);
}
}
@@ -122,7 +122,7 @@ private:
{
}
- ~TExecutionSampler() = default;
+ ~TExecutionSampler() = default;
// Signal handler is not allowed to do anything that can deadlock with activity
// on the thread to which the signal is delivered or corrupt data structures that
@@ -232,7 +232,7 @@ private:
}
inline bool IsSlotEmpty(ui32 slot) const {
- return Ips[slot].first == nullptr;
+ return Ips[slot].first == nullptr;
}
inline bool InsertsAllowed() const {
@@ -244,7 +244,7 @@ private:
Y_ASSERT(WriteFlag == 1);
for (size_t i = 0; i < SZ; ++i) {
- Ips[i] = std::make_pair((void*)nullptr, (size_t)0);
+ Ips[i] = std::make_pair((void*)nullptr, (size_t)0);
}
Samples = 0;
AtomicSet(DroppedSamples, 0);
@@ -282,7 +282,7 @@ public:
Samples.swap(samples);
}
- ~TSampleAnalyser() = default;
+ ~TSampleAnalyser() = default;
void Analyze(FILE* out) const;
@@ -329,7 +329,7 @@ void TSampleAnalyser::Analyze(FILE* out) const {
}
}
-TExecutionSampler* TExecutionSampler::SInstance = nullptr;
+TExecutionSampler* TExecutionSampler::SInstance = nullptr;
// Starts capturing execution samples
void BeginProfiling() {