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

Side by Side Diff: src/libsampler/sampler.h

Issue 2758563002: [gn] Enable stricter build flags (Closed)
Patch Set: Fix one last unused variable error Created 3 years, 9 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
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_LIBSAMPLER_SAMPLER_H_ 5 #ifndef V8_LIBSAMPLER_SAMPLER_H_
6 #define V8_LIBSAMPLER_SAMPLER_H_ 6 #define V8_LIBSAMPLER_SAMPLER_H_
7 7
8 #include "include/v8.h" 8 #include "include/v8.h"
9 9
10 #include "src/base/atomicops.h" 10 #include "src/base/atomicops.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 // Whether the sampling thread should use this Sampler for CPU profiling? 47 // Whether the sampling thread should use this Sampler for CPU profiling?
48 bool IsProfiling() const { 48 bool IsProfiling() const {
49 return base::NoBarrier_Load(&profiling_) > 0 && 49 return base::NoBarrier_Load(&profiling_) > 0 &&
50 !base::NoBarrier_Load(&has_processing_thread_); 50 !base::NoBarrier_Load(&has_processing_thread_);
51 } 51 }
52 void IncreaseProfilingDepth(); 52 void IncreaseProfilingDepth();
53 void DecreaseProfilingDepth(); 53 void DecreaseProfilingDepth();
54 54
55 // Whether the sampler is running (that is, consumes resources). 55 // Whether the sampler is running (that is, consumes resources).
56 bool IsActive() const { return base::NoBarrier_Load(&active_); } 56 bool IsActive() const { return base::NoBarrier_Load(&active_) != 0; }
57 57
58 // CpuProfiler collects samples by calling DoSample directly 58 // CpuProfiler collects samples by calling DoSample directly
59 // without calling Start. To keep it working, we register the sampler 59 // without calling Start. To keep it working, we register the sampler
60 // with the CpuProfiler. 60 // with the CpuProfiler.
61 bool IsRegistered() const { return base::NoBarrier_Load(&registered_); } 61 bool IsRegistered() const { return base::NoBarrier_Load(&registered_) != 0; }
62 62
63 void DoSample(); 63 void DoSample();
64 64
65 void SetHasProcessingThread(bool value) { 65 void SetHasProcessingThread(bool value) {
66 base::NoBarrier_Store(&has_processing_thread_, value); 66 base::NoBarrier_Store(&has_processing_thread_, value);
67 } 67 }
68 68
69 // Used in tests to make sure that stack sampling is performed. 69 // Used in tests to make sure that stack sampling is performed.
70 unsigned js_sample_count() const { return js_sample_count_; } 70 unsigned js_sample_count() const { return js_sample_count_; }
71 unsigned external_sample_count() const { return external_sample_count_; } 71 unsigned external_sample_count() const { return external_sample_count_; }
(...skipping 22 matching lines...) Expand all
94 base::Atomic32 active_; 94 base::Atomic32 active_;
95 base::Atomic32 registered_; 95 base::Atomic32 registered_;
96 PlatformData* data_; // Platform specific data. 96 PlatformData* data_; // Platform specific data.
97 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); 97 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler);
98 }; 98 };
99 99
100 } // namespace sampler 100 } // namespace sampler
101 } // namespace v8 101 } // namespace v8
102 102
103 #endif // V8_LIBSAMPLER_SAMPLER_H_ 103 #endif // V8_LIBSAMPLER_SAMPLER_H_
OLDNEW
« src/compiler/gap-resolver.cc ('K') | « src/interpreter/bytecodes.h ('k') | src/lookup.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698