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

Side by Side Diff: src/log.cc

Issue 1998213002: Workaround for glibc semaphore bug. (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
« src/heap/page-parallel-job.h ('K') | « 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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 // Inserts collected profiling data into buffer. 553 // Inserts collected profiling data into buffer.
554 void Insert(TickSample* sample) { 554 void Insert(TickSample* sample) {
555 if (paused_) 555 if (paused_)
556 return; 556 return;
557 557
558 if (Succ(head_) == static_cast<int>(base::NoBarrier_Load(&tail_))) { 558 if (Succ(head_) == static_cast<int>(base::NoBarrier_Load(&tail_))) {
559 overflow_ = true; 559 overflow_ = true;
560 } else { 560 } else {
561 buffer_[head_] = *sample; 561 buffer_[head_] = *sample;
562 head_ = Succ(head_); 562 head_ = Succ(head_);
563 buffer_semaphore_.Signal("Profiler::Insert"); // Tell we have an element. 563 buffer_semaphore_.Signal(); // Tell we have an element.
564 } 564 }
565 } 565 }
566 566
567 virtual void Run(); 567 virtual void Run();
568 568
569 // Pause and Resume TickSample data collection. 569 // Pause and Resume TickSample data collection.
570 void pause() { paused_ = true; } 570 void pause() { paused_ = true; }
571 void resume() { paused_ = false; } 571 void resume() { paused_ = false; }
572 572
573 private: 573 private:
(...skipping 1277 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
« src/heap/page-parallel-job.h ('K') | « src/heap/spaces.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698