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

Side by Side Diff: src/deoptimizer.h

Issue 919953002: CPUProfiler: Push deopt reason further to ProfileNode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
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_DEOPTIMIZER_H_ 5 #ifndef V8_DEOPTIMIZER_H_
6 #define V8_DEOPTIMIZER_H_ 6 #define V8_DEOPTIMIZER_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 DEOPT_MESSAGES_LIST(DEOPT_MESSAGES_CONSTANTS) kLastDeoptReason 181 DEOPT_MESSAGES_LIST(DEOPT_MESSAGES_CONSTANTS) kLastDeoptReason
182 }; 182 };
183 #undef DEOPT_MESSAGES_CONSTANTS 183 #undef DEOPT_MESSAGES_CONSTANTS
184 184
185 static const char* GetDeoptReason(DeoptReason deopt_reason); 185 static const char* GetDeoptReason(DeoptReason deopt_reason);
186 186
187 struct DeoptInfo { 187 struct DeoptInfo {
188 DeoptInfo(int r, const char* m, DeoptReason d) 188 DeoptInfo(int r, const char* m, DeoptReason d)
189 : raw_position(r), mnemonic(m), deopt_reason(d) {} 189 : raw_position(r), mnemonic(m), deopt_reason(d) {}
190 190
191 bool operator==(const DeoptInfo& other) const {
192 return raw_position == other.raw_position &&
193 CStringEquals(mnemonic, other.mnemonic) &&
194 deopt_reason == other.deopt_reason;
195 }
196
197 bool operator!=(const DeoptInfo& other) const { return !(*this == other); }
198
199 int raw_position; 191 int raw_position;
200 const char* mnemonic; 192 const char* mnemonic;
201 DeoptReason deopt_reason; 193 DeoptReason deopt_reason;
202 }; 194 };
203 195
204 static DeoptInfo GetDeoptInfo(Code* code, int bailout_id); 196 static DeoptInfo GetDeoptInfo(Code* code, int bailout_id);
205 197
206 struct JumpTableEntry : public ZoneObject { 198 struct JumpTableEntry : public ZoneObject {
207 inline JumpTableEntry(Address entry, const DeoptInfo& deopt_info, 199 inline JumpTableEntry(Address entry, const DeoptInfo& deopt_info,
208 Deoptimizer::BailoutType type, bool frame) 200 Deoptimizer::BailoutType type, bool frame)
209 : label(), 201 : label(),
210 address(entry), 202 address(entry),
211 deopt_info(deopt_info), 203 deopt_info(deopt_info),
212 bailout_type(type), 204 bailout_type(type),
213 needs_frame(frame) {} 205 needs_frame(frame) {}
214 206
215 bool IsEquivalentTo(const JumpTableEntry& other) const { 207 bool IsEquivalentTo(const JumpTableEntry& other) const {
216 return address == other.address && bailout_type == other.bailout_type && 208 return address == other.address && bailout_type == other.bailout_type &&
217 needs_frame == other.needs_frame && 209 needs_frame == other.needs_frame;
218 (!FLAG_trace_deopt || deopt_info == other.deopt_info);
Sven Panne 2015/02/12 08:42:31 Why has this been removed? In earlier versions we
loislo 2015/02/12 08:54:05 I need to push different entries if FLAG_trace_deo
219 } 210 }
220 211
221 Label label; 212 Label label;
222 Address address; 213 Address address;
223 DeoptInfo deopt_info; 214 DeoptInfo deopt_info;
224 Deoptimizer::BailoutType bailout_type; 215 Deoptimizer::BailoutType bailout_type;
225 bool needs_frame; 216 bool needs_frame;
226 }; 217 };
227 218
228 static bool TraceEnabledFor(BailoutType deopt_type, 219 static bool TraceEnabledFor(BailoutType deopt_type,
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
1066 Object** parameters_; 1057 Object** parameters_;
1067 Object** expression_stack_; 1058 Object** expression_stack_;
1068 int source_position_; 1059 int source_position_;
1069 1060
1070 friend class Deoptimizer; 1061 friend class Deoptimizer;
1071 }; 1062 };
1072 1063
1073 } } // namespace v8::internal 1064 } } // namespace v8::internal
1074 1065
1075 #endif // V8_DEOPTIMIZER_H_ 1066 #endif // V8_DEOPTIMIZER_H_
OLDNEW
« no previous file with comments | « src/cpu-profiler-inl.h ('k') | src/ia32/assembler-ia32.cc » ('j') | src/profile-generator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698