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

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

Issue 290093005: Introduce a separate event for CodeDisableOpt (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: removed extra line Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 "allocation.h" 8 #include "allocation.h"
9 #include "atomicops.h" 9 #include "atomicops.h"
10 #include "circular-queue.h" 10 #include "circular-queue.h"
11 #include "platform/time.h" 11 #include "platform/time.h"
12 #include "sampler.h" 12 #include "sampler.h"
13 #include "unbound-queue.h" 13 #include "unbound-queue.h"
14 14
15 namespace v8 { 15 namespace v8 {
16 namespace internal { 16 namespace internal {
17 17
18 // Forward declarations. 18 // Forward declarations.
19 class CodeEntry; 19 class CodeEntry;
20 class CodeMap; 20 class CodeMap;
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(SHARED_FUNC_MOVE, SharedFunctionInfoMoveEventRecord) \ 30 V(SHARED_FUNC_MOVE, SharedFunctionInfoMoveEventRecord) \
30 V(REPORT_BUILTIN, ReportBuiltinEventRecord) 31 V(REPORT_BUILTIN, ReportBuiltinEventRecord)
31 32
32 33
33 class CodeEventRecord { 34 class CodeEventRecord {
34 public: 35 public:
35 #define DECLARE_TYPE(type, ignore) type, 36 #define DECLARE_TYPE(type, ignore) type,
36 enum Type { 37 enum Type {
37 NONE = 0, 38 NONE = 0,
38 CODE_EVENTS_TYPE_LIST(DECLARE_TYPE) 39 CODE_EVENTS_TYPE_LIST(DECLARE_TYPE)
(...skipping 19 matching lines...) Expand all
58 59
59 class CodeMoveEventRecord : public CodeEventRecord { 60 class CodeMoveEventRecord : public CodeEventRecord {
60 public: 61 public:
61 Address from; 62 Address from;
62 Address to; 63 Address to;
63 64
64 INLINE(void UpdateCodeMap(CodeMap* code_map)); 65 INLINE(void UpdateCodeMap(CodeMap* code_map));
65 }; 66 };
66 67
67 68
69 class CodeDisableOptEventRecord : public CodeEventRecord {
70 public:
71 Address start;
72 const char* bailout_reason;
73
74 INLINE(void UpdateCodeMap(CodeMap* code_map));
75 };
76
77
68 class SharedFunctionInfoMoveEventRecord : public CodeEventRecord { 78 class SharedFunctionInfoMoveEventRecord : public CodeEventRecord {
69 public: 79 public:
70 Address from; 80 Address from;
71 Address to; 81 Address to;
72 82
73 INLINE(void UpdateCodeMap(CodeMap* code_map)); 83 INLINE(void UpdateCodeMap(CodeMap* code_map));
74 }; 84 };
75 85
76 86
77 class ReportBuiltinEventRecord : public CodeEventRecord { 87 class ReportBuiltinEventRecord : public CodeEventRecord {
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 Name* name); 228 Name* name);
219 virtual void CodeCreateEvent(Logger::LogEventsAndTags tag, 229 virtual void CodeCreateEvent(Logger::LogEventsAndTags tag,
220 Code* code, 230 Code* code,
221 SharedFunctionInfo* shared, 231 SharedFunctionInfo* shared,
222 CompilationInfo* info, 232 CompilationInfo* info,
223 Name* source, int line, int column); 233 Name* source, int line, int column);
224 virtual void CodeCreateEvent(Logger::LogEventsAndTags tag, 234 virtual void CodeCreateEvent(Logger::LogEventsAndTags tag,
225 Code* code, int args_count); 235 Code* code, int args_count);
226 virtual void CodeMovingGCEvent() {} 236 virtual void CodeMovingGCEvent() {}
227 virtual void CodeMoveEvent(Address from, Address to); 237 virtual void CodeMoveEvent(Address from, Address to);
238 virtual void CodeDisableOptEvent(Code* code, SharedFunctionInfo* shared);
228 virtual void CodeDeleteEvent(Address from); 239 virtual void CodeDeleteEvent(Address from);
229 virtual void GetterCallbackEvent(Name* name, Address entry_point); 240 virtual void GetterCallbackEvent(Name* name, Address entry_point);
230 virtual void RegExpCodeCreateEvent(Code* code, String* source); 241 virtual void RegExpCodeCreateEvent(Code* code, String* source);
231 virtual void SetterCallbackEvent(Name* name, Address entry_point); 242 virtual void SetterCallbackEvent(Name* name, Address entry_point);
232 virtual void SharedFunctionInfoMoveEvent(Address from, Address to); 243 virtual void SharedFunctionInfoMoveEvent(Address from, Address to);
233 244
234 INLINE(bool is_profiling() const) { return is_profiling_; } 245 INLINE(bool is_profiling() const) { return is_profiling_; }
235 bool* is_profiling_address() { 246 bool* is_profiling_address() {
236 return &is_profiling_; 247 return &is_profiling_;
237 } 248 }
(...skipping 17 matching lines...) Expand all
255 bool saved_is_logging_; 266 bool saved_is_logging_;
256 bool is_profiling_; 267 bool is_profiling_;
257 268
258 DISALLOW_COPY_AND_ASSIGN(CpuProfiler); 269 DISALLOW_COPY_AND_ASSIGN(CpuProfiler);
259 }; 270 };
260 271
261 } } // namespace v8::internal 272 } } // namespace v8::internal
262 273
263 274
264 #endif // V8_CPU_PROFILER_H_ 275 #endif // V8_CPU_PROFILER_H_
OLDNEW
« no previous file with comments | « no previous file | src/cpu-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698