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

Side by Side Diff: src/cpu-profiler.h

Issue 941973002: CpuProfiler: eliminate cpu-profiler dependency from heap-inl.h (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: comments addressed Created 5 years, 10 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/arm64/lithium-codegen-arm64.cc ('k') | src/cpu-profiler.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 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 #ifndef V8_CPU_PROFILER_H_ 5 #ifndef V8_CPU_PROFILER_H_
6 #define V8_CPU_PROFILER_H_ 6 #define V8_CPU_PROFILER_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/base/atomicops.h" 9 #include "src/base/atomicops.h"
10 #include "src/base/platform/time.h" 10 #include "src/base/platform/time.h"
(...skipping 10 matching lines...) Expand all
21 class CompilationInfo; 21 class CompilationInfo;
22 class CpuProfile; 22 class CpuProfile;
23 class CpuProfilesCollection; 23 class CpuProfilesCollection;
24 class ProfileGenerator; 24 class ProfileGenerator;
25 25
26 #define CODE_EVENTS_TYPE_LIST(V) \ 26 #define CODE_EVENTS_TYPE_LIST(V) \
27 V(CODE_CREATION, CodeCreateEventRecord) \ 27 V(CODE_CREATION, CodeCreateEventRecord) \
28 V(CODE_MOVE, CodeMoveEventRecord) \ 28 V(CODE_MOVE, CodeMoveEventRecord) \
29 V(CODE_DISABLE_OPT, CodeDisableOptEventRecord) \ 29 V(CODE_DISABLE_OPT, CodeDisableOptEventRecord) \
30 V(CODE_DEOPT, CodeDeoptEventRecord) \ 30 V(CODE_DEOPT, CodeDeoptEventRecord) \
31 V(SHARED_FUNC_MOVE, SharedFunctionInfoMoveEventRecord) \
32 V(REPORT_BUILTIN, ReportBuiltinEventRecord) 31 V(REPORT_BUILTIN, ReportBuiltinEventRecord)
33 32
34 33
35 class CodeEventRecord { 34 class CodeEventRecord {
36 public: 35 public:
37 #define DECLARE_TYPE(type, ignore) type, 36 #define DECLARE_TYPE(type, ignore) type,
38 enum Type { 37 enum Type {
39 NONE = 0, 38 NONE = 0,
40 CODE_EVENTS_TYPE_LIST(DECLARE_TYPE) 39 CODE_EVENTS_TYPE_LIST(DECLARE_TYPE)
41 NUMBER_OF_TYPES 40 NUMBER_OF_TYPES
42 }; 41 };
43 #undef DECLARE_TYPE 42 #undef DECLARE_TYPE
44 43
45 Type type; 44 Type type;
46 mutable unsigned order; 45 mutable unsigned order;
47 }; 46 };
48 47
49 48
50 class CodeCreateEventRecord : public CodeEventRecord { 49 class CodeCreateEventRecord : public CodeEventRecord {
51 public: 50 public:
52 Address start; 51 Address start;
53 CodeEntry* entry; 52 CodeEntry* entry;
54 unsigned size; 53 unsigned size;
55 Address shared;
56 54
57 INLINE(void UpdateCodeMap(CodeMap* code_map)); 55 INLINE(void UpdateCodeMap(CodeMap* code_map));
58 }; 56 };
59 57
60 58
61 class CodeMoveEventRecord : public CodeEventRecord { 59 class CodeMoveEventRecord : public CodeEventRecord {
62 public: 60 public:
63 Address from; 61 Address from;
64 Address to; 62 Address to;
65 63
(...skipping 13 matching lines...) Expand all
79 class CodeDeoptEventRecord : public CodeEventRecord { 77 class CodeDeoptEventRecord : public CodeEventRecord {
80 public: 78 public:
81 Address start; 79 Address start;
82 const char* deopt_reason; 80 const char* deopt_reason;
83 int raw_position; 81 int raw_position;
84 82
85 INLINE(void UpdateCodeMap(CodeMap* code_map)); 83 INLINE(void UpdateCodeMap(CodeMap* code_map));
86 }; 84 };
87 85
88 86
89 class SharedFunctionInfoMoveEventRecord : public CodeEventRecord {
90 public:
91 Address from;
92 Address to;
93
94 INLINE(void UpdateCodeMap(CodeMap* code_map));
95 };
96
97
98 class ReportBuiltinEventRecord : public CodeEventRecord { 87 class ReportBuiltinEventRecord : public CodeEventRecord {
99 public: 88 public:
100 Address start; 89 Address start;
101 Builtins::Name builtin_id; 90 Builtins::Name builtin_id;
102 91
103 INLINE(void UpdateCodeMap(CodeMap* code_map)); 92 INLINE(void UpdateCodeMap(CodeMap* code_map));
104 }; 93 };
105 94
106 95
107 class TickSampleEventRecord { 96 class TickSampleEventRecord {
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 Code* code, int args_count); 233 Code* code, int args_count);
245 virtual void CodeMovingGCEvent() {} 234 virtual void CodeMovingGCEvent() {}
246 virtual void CodeMoveEvent(Address from, Address to); 235 virtual void CodeMoveEvent(Address from, Address to);
247 virtual void CodeDisableOptEvent(Code* code, SharedFunctionInfo* shared); 236 virtual void CodeDisableOptEvent(Code* code, SharedFunctionInfo* shared);
248 virtual void CodeDeoptEvent(Code* code, int bailout_id, Address pc, 237 virtual void CodeDeoptEvent(Code* code, int bailout_id, Address pc,
249 int fp_to_sp_delta); 238 int fp_to_sp_delta);
250 virtual void CodeDeleteEvent(Address from); 239 virtual void CodeDeleteEvent(Address from);
251 virtual void GetterCallbackEvent(Name* name, Address entry_point); 240 virtual void GetterCallbackEvent(Name* name, Address entry_point);
252 virtual void RegExpCodeCreateEvent(Code* code, String* source); 241 virtual void RegExpCodeCreateEvent(Code* code, String* source);
253 virtual void SetterCallbackEvent(Name* name, Address entry_point); 242 virtual void SetterCallbackEvent(Name* name, Address entry_point);
254 virtual void SharedFunctionInfoMoveEvent(Address from, Address to); 243 virtual void SharedFunctionInfoMoveEvent(Address from, Address to) {}
255 244
256 INLINE(bool is_profiling() const) { return is_profiling_; } 245 INLINE(bool is_profiling() const) { return is_profiling_; }
257 bool* is_profiling_address() { 246 bool* is_profiling_address() {
258 return &is_profiling_; 247 return &is_profiling_;
259 } 248 }
260 249
261 ProfileGenerator* generator() const { return generator_; } 250 ProfileGenerator* generator() const { return generator_; }
262 ProfilerEventsProcessor* processor() const { return processor_; } 251 ProfilerEventsProcessor* processor() const { return processor_; }
263 Isolate* isolate() const { return isolate_; } 252 Isolate* isolate() const { return isolate_; }
264 253
(...skipping 12 matching lines...) Expand all
277 bool saved_is_logging_; 266 bool saved_is_logging_;
278 bool is_profiling_; 267 bool is_profiling_;
279 268
280 DISALLOW_COPY_AND_ASSIGN(CpuProfiler); 269 DISALLOW_COPY_AND_ASSIGN(CpuProfiler);
281 }; 270 };
282 271
283 } } // namespace v8::internal 272 } } // namespace v8::internal
284 273
285 274
286 #endif // V8_CPU_PROFILER_H_ 275 #endif // V8_CPU_PROFILER_H_
OLDNEW
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/cpu-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698