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

Side by Side Diff: src/tracing/tracing-category-observer.h

Issue 2472193002: [profiler] Introduce lightweight mode for Rutime Call Stats collection. (Closed)
Patch Set: . 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
« no previous file with comments | « src/counters.h ('k') | src/tracing/tracing-category-observer.cc » ('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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 #ifndef V8_TRACING_TRACING_CATEGORY_OBSERVER_H_ 5 #ifndef V8_TRACING_TRACING_CATEGORY_OBSERVER_H_
6 #define V8_TRACING_TRACING_CATEGORY_OBSERVER_H_ 6 #define V8_TRACING_TRACING_CATEGORY_OBSERVER_H_
7 7
8 #include "include/v8-platform.h" 8 #include "include/v8-platform.h"
9 #include "src/base/lazy-instance.h"
10 9
11 namespace v8 { 10 namespace v8 {
12 namespace tracing { 11 namespace tracing {
13 12
14 class TracingCategoryObserver : public Platform::TraceStateObserver { 13 class TracingCategoryObserver : public Platform::TraceStateObserver {
15 public: 14 public:
16 enum Mode { 15 enum Mode {
17 ENABLED_BY_NATIVE = 1 << 0, 16 ENABLED_BY_NATIVE = 1 << 0,
18 ENABLED_BY_TRACING = 1 << 1, 17 ENABLED_BY_TRACING = 1 << 1,
18 ENABLED_BY_SAMPLING = 1 << 2,
19 }; 19 };
20 20
21 static void SetUp(); 21 static void SetUp();
22 static void TearDown(); 22 static void TearDown();
23 23
24 // v8::Platform::TraceStateObserver 24 // v8::Platform::TraceStateObserver
25 void OnTraceEnabled() final; 25 void OnTraceEnabled() final;
26 void OnTraceDisabled() final; 26 void OnTraceDisabled() final;
27 27
28 TracingCategoryObserver() {}
29 ~TracingCategoryObserver() {}
30
31 private: 28 private:
32 static TracingCategoryObserver* instance_; 29 static TracingCategoryObserver* instance_;
33 }; 30 };
34 31
35 } // namespace tracing 32 } // namespace tracing
36 } // namespace v8 33 } // namespace v8
34
37 #endif // V8_TRACING_TRACING_CATEGORY_OBSERVER_H_ 35 #endif // V8_TRACING_TRACING_CATEGORY_OBSERVER_H_
OLDNEW
« no previous file with comments | « src/counters.h ('k') | src/tracing/tracing-category-observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698