Commit b48f850a authored by Franziska Hinkelmann's avatar Franziska Hinkelmann Committed by Commit Bot

[cleanup] Fix code style

Bug: 
Change-Id: I341ab2833896afcb1f97a6d4c3af3afb12a26b8a
Reviewed-on: https://chromium-review.googlesource.com/753083Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Franziska Hinkelmann <franzih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49096}
parent b7168573
...@@ -562,8 +562,8 @@ class Profiler: public base::Thread { ...@@ -562,8 +562,8 @@ class Profiler: public base::Thread {
virtual void Run(); virtual void Run();
// Pause and Resume TickSample data collection. // Pause and Resume TickSample data collection.
void pause() { paused_ = true; } void Pause() { paused_ = true; }
void resume() { paused_ = false; } void Resume() { paused_ = false; }
private: private:
// Waits for a signal and removes profiling data. // Waits for a signal and removes profiling data.
...@@ -588,7 +588,7 @@ class Profiler: public base::Thread { ...@@ -588,7 +588,7 @@ class Profiler: public base::Thread {
int head_; // Index to the buffer head. int head_; // Index to the buffer head.
base::Atomic32 tail_; // Index to the buffer tail. base::Atomic32 tail_; // Index to the buffer tail.
bool overflow_; // Tell whether a buffer overflow has occurred. bool overflow_; // Tell whether a buffer overflow has occurred.
// Sempahore used for buffer synchronization. // Semaphore used for buffer synchronization.
base::Semaphore buffer_semaphore_; base::Semaphore buffer_semaphore_;
// Tells whether profiler is engaged, that is, processing thread is stated. // Tells whether profiler is engaged, that is, processing thread is stated.
...@@ -646,9 +646,8 @@ class Ticker: public sampler::Sampler { ...@@ -646,9 +646,8 @@ class Ticker: public sampler::Sampler {
SamplingThread* sampling_thread_; SamplingThread* sampling_thread_;
}; };
// //
// Profiler implementation. // Profiler implementation when invoking with --prof.
// //
Profiler::Profiler(Isolate* isolate) Profiler::Profiler(Isolate* isolate)
: base::Thread(Options("v8:Profiler")), : base::Thread(Options("v8:Profiler")),
...@@ -699,7 +698,7 @@ void Profiler::Disengage() { ...@@ -699,7 +698,7 @@ void Profiler::Disengage() {
base::Relaxed_Store(&running_, 0); base::Relaxed_Store(&running_, 0);
v8::TickSample sample; v8::TickSample sample;
// Reset 'paused_' flag, otherwise semaphore may not be signalled. // Reset 'paused_' flag, otherwise semaphore may not be signalled.
resume(); Resume();
Insert(&sample); Insert(&sample);
Join(); Join();
...@@ -1458,7 +1457,7 @@ void Logger::MapDetails(Map* map) { ...@@ -1458,7 +1457,7 @@ void Logger::MapDetails(Map* map) {
void Logger::StopProfiler() { void Logger::StopProfiler() {
if (!log_->IsEnabled()) return; if (!log_->IsEnabled()) return;
if (profiler_ != nullptr) { if (profiler_ != nullptr) {
profiler_->pause(); profiler_->Pause();
is_logging_ = false; is_logging_ = false;
removeCodeEventListener(this); removeCodeEventListener(this);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment