Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Side by Side Diff: src/log.cc

Issue 1961893002: Instrument callers of Semaphore::Signal to help with investigation of (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/spaces.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/log.h" 5 #include "src/log.h"
6 6
7 #include <cstdarg> 7 #include <cstdarg>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/bailout-reason.h" 10 #include "src/bailout-reason.h"
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 // Inserts collected profiling data into buffer. 554 // Inserts collected profiling data into buffer.
555 void Insert(TickSample* sample) { 555 void Insert(TickSample* sample) {
556 if (paused_) 556 if (paused_)
557 return; 557 return;
558 558
559 if (Succ(head_) == static_cast<int>(base::NoBarrier_Load(&tail_))) { 559 if (Succ(head_) == static_cast<int>(base::NoBarrier_Load(&tail_))) {
560 overflow_ = true; 560 overflow_ = true;
561 } else { 561 } else {
562 buffer_[head_] = *sample; 562 buffer_[head_] = *sample;
563 head_ = Succ(head_); 563 head_ = Succ(head_);
564 buffer_semaphore_.Signal(); // Tell we have an element. 564 buffer_semaphore_.Signal("Profiler::Insert"); // Tell we have an element.
565 } 565 }
566 } 566 }
567 567
568 virtual void Run(); 568 virtual void Run();
569 569
570 // Pause and Resume TickSample data collection. 570 // Pause and Resume TickSample data collection.
571 void pause() { paused_ = true; } 571 void pause() { paused_ = true; }
572 void resume() { paused_ = false; } 572 void resume() { paused_ = false; }
573 573
574 private: 574 private:
(...skipping 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after
1851 removeCodeEventListener(jit_logger_); 1851 removeCodeEventListener(jit_logger_);
1852 delete jit_logger_; 1852 delete jit_logger_;
1853 jit_logger_ = NULL; 1853 jit_logger_ = NULL;
1854 } 1854 }
1855 1855
1856 return log_->Close(); 1856 return log_->Close();
1857 } 1857 }
1858 1858
1859 } // namespace internal 1859 } // namespace internal
1860 } // namespace v8 1860 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/spaces.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698