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

Side by Side Diff: src/v8.cc

Issue 2471583004: [Tracing] Make TracingCategoryObserver v8 internal. (Closed)
Patch Set: use unique_ptr Created 4 years, 1 month 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/assembler.h" 7 #include "src/assembler.h"
8 #include "src/base/once.h" 8 #include "src/base/once.h"
9 #include "src/base/platform/platform.h" 9 #include "src/base/platform/platform.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
11 #include "src/crankshaft/lithium-allocator.h" 11 #include "src/crankshaft/lithium-allocator.h"
12 #include "src/debug/debug.h" 12 #include "src/debug/debug.h"
13 #include "src/deoptimizer.h" 13 #include "src/deoptimizer.h"
14 #include "src/elements.h" 14 #include "src/elements.h"
15 #include "src/frames.h" 15 #include "src/frames.h"
16 #include "src/isolate.h" 16 #include "src/isolate.h"
17 #include "src/libsampler/sampler.h" 17 #include "src/libsampler/sampler.h"
18 #include "src/objects.h" 18 #include "src/objects.h"
19 #include "src/profiler/heap-profiler.h" 19 #include "src/profiler/heap-profiler.h"
20 #include "src/runtime-profiler.h" 20 #include "src/runtime-profiler.h"
21 #include "src/snapshot/natives.h" 21 #include "src/snapshot/natives.h"
22 #include "src/snapshot/snapshot.h" 22 #include "src/snapshot/snapshot.h"
23 23 #include "src/tracing/tracing-category-observer.h"
24 24
25 namespace v8 { 25 namespace v8 {
26 namespace internal { 26 namespace internal {
27 27
28 V8_DECLARE_ONCE(init_once); 28 V8_DECLARE_ONCE(init_once);
29 29
30 #ifdef V8_USE_EXTERNAL_STARTUP_DATA 30 #ifdef V8_USE_EXTERNAL_STARTUP_DATA
31 V8_DECLARE_ONCE(init_natives_once); 31 V8_DECLARE_ONCE(init_natives_once);
32 V8_DECLARE_ONCE(init_snapshot_once); 32 V8_DECLARE_ONCE(init_snapshot_once);
33 #endif 33 #endif
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 void V8::InitializeOncePerProcess() { 88 void V8::InitializeOncePerProcess() {
89 base::CallOnce(&init_once, &InitializeOncePerProcessImpl); 89 base::CallOnce(&init_once, &InitializeOncePerProcessImpl);
90 } 90 }
91 91
92 92
93 void V8::InitializePlatform(v8::Platform* platform) { 93 void V8::InitializePlatform(v8::Platform* platform) {
94 CHECK(!platform_); 94 CHECK(!platform_);
95 CHECK(platform); 95 CHECK(platform);
96 platform_ = platform; 96 platform_ = platform;
97 v8::tracing::TracingCategoryObserver::SetUp();
97 } 98 }
98 99
99 100
100 void V8::ShutdownPlatform() { 101 void V8::ShutdownPlatform() {
101 CHECK(platform_); 102 CHECK(platform_);
103 v8::tracing::TracingCategoryObserver::TearDown();
102 platform_ = NULL; 104 platform_ = NULL;
103 } 105 }
104 106
105 107
106 v8::Platform* V8::GetCurrentPlatform() { 108 v8::Platform* V8::GetCurrentPlatform() {
107 DCHECK(platform_); 109 DCHECK(platform_);
108 return platform_; 110 return platform_;
109 } 111 }
110 112
111 113
(...skipping 11 matching lines...) Expand all
123 125
124 void V8::SetSnapshotBlob(StartupData* snapshot_blob) { 126 void V8::SetSnapshotBlob(StartupData* snapshot_blob) {
125 #ifdef V8_USE_EXTERNAL_STARTUP_DATA 127 #ifdef V8_USE_EXTERNAL_STARTUP_DATA
126 base::CallOnce(&init_snapshot_once, &SetSnapshotFromFile, snapshot_blob); 128 base::CallOnce(&init_snapshot_once, &SetSnapshotFromFile, snapshot_blob);
127 #else 129 #else
128 CHECK(false); 130 CHECK(false);
129 #endif 131 #endif
130 } 132 }
131 } // namespace internal 133 } // namespace internal
132 } // namespace v8 134 } // namespace v8
OLDNEW
« src/d8.cc ('K') | « src/tracing/tracing-category-observer.cc ('k') | src/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698