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

Side by Side Diff: src/inspector/v8-profiler-agent-impl.cc

Issue 2912773002: Rename "NoBarrier" memory operations to "Relaxed". (Closed)
Patch Set: comment Created 3 years, 6 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/ic/ic-stats.cc ('k') | src/isolate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/inspector/v8-profiler-agent-impl.h" 5 #include "src/inspector/v8-profiler-agent-impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "src/base/atomicops.h" 9 #include "src/base/atomicops.h"
10 #include "src/inspector/protocol/Protocol.h" 10 #include "src/inspector/protocol/Protocol.h"
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 std::unique_ptr<protocol::Array<protocol::Profiler::ScriptCoverage>>* 357 std::unique_ptr<protocol::Array<protocol::Profiler::ScriptCoverage>>*
358 out_result) { 358 out_result) {
359 v8::HandleScope handle_scope(m_isolate); 359 v8::HandleScope handle_scope(m_isolate);
360 v8::debug::Coverage coverage = 360 v8::debug::Coverage coverage =
361 v8::debug::Coverage::CollectBestEffort(m_isolate); 361 v8::debug::Coverage::CollectBestEffort(m_isolate);
362 return coverageToProtocol(m_isolate, coverage, out_result); 362 return coverageToProtocol(m_isolate, coverage, out_result);
363 } 363 }
364 364
365 String16 V8ProfilerAgentImpl::nextProfileId() { 365 String16 V8ProfilerAgentImpl::nextProfileId() {
366 return String16::fromInteger( 366 return String16::fromInteger(
367 v8::base::NoBarrier_AtomicIncrement(&s_lastProfileId, 1)); 367 v8::base::Relaxed_AtomicIncrement(&s_lastProfileId, 1));
368 } 368 }
369 369
370 void V8ProfilerAgentImpl::startProfiling(const String16& title) { 370 void V8ProfilerAgentImpl::startProfiling(const String16& title) {
371 v8::HandleScope handleScope(m_isolate); 371 v8::HandleScope handleScope(m_isolate);
372 if (!m_startedProfilesCount) { 372 if (!m_startedProfilesCount) {
373 DCHECK(!m_profiler); 373 DCHECK(!m_profiler);
374 m_profiler = v8::CpuProfiler::New(m_isolate); 374 m_profiler = v8::CpuProfiler::New(m_isolate);
375 m_profiler->SetIdle(m_idle); 375 m_profiler->SetIdle(m_idle);
376 int interval = 376 int interval =
377 m_state->integerProperty(ProfilerAgentState::samplingInterval, 0); 377 m_state->integerProperty(ProfilerAgentState::samplingInterval, 0);
(...skipping 27 matching lines...) Expand all
405 return m_profiler; 405 return m_profiler;
406 } 406 }
407 407
408 bool V8ProfilerAgentImpl::idleFinished() { 408 bool V8ProfilerAgentImpl::idleFinished() {
409 m_idle = false; 409 m_idle = false;
410 if (m_profiler) m_profiler->SetIdle(m_idle); 410 if (m_profiler) m_profiler->SetIdle(m_idle);
411 return m_profiler; 411 return m_profiler;
412 } 412 }
413 413
414 } // namespace v8_inspector 414 } // namespace v8_inspector
OLDNEW
« no previous file with comments | « src/ic/ic-stats.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698