| Index: src/profile-generator.h
|
| diff --git a/src/profile-generator.h b/src/profile-generator.h
|
| index 679e9298124f5d7e06cae14aac48d52cea38ddda..f7176a053a2a0c962cef8174ca0ee0522a3c1b96 100644
|
| --- a/src/profile-generator.h
|
| +++ b/src/profile-generator.h
|
| @@ -90,11 +90,20 @@ class CodeEntry {
|
| void set_bailout_reason(const char* bailout_reason) {
|
| bailout_reason_ = bailout_reason;
|
| }
|
| - void set_deopt_reason(const char* deopt_reason) {
|
| + const char* bailout_reason() const { return bailout_reason_; }
|
| +
|
| + void set_deopt_info(const char* deopt_reason, int location) {
|
| + DCHECK(!deopt_location_);
|
| deopt_reason_ = deopt_reason;
|
| + deopt_location_ = location;
|
| + }
|
| + const char* deopt_reason() const { return deopt_reason_; }
|
| + int deopt_location() const { return deopt_location_; }
|
| + bool has_deopt_info() const { return deopt_location_; }
|
| + void clear_deopt_info() {
|
| + deopt_reason_ = kNoDeoptReason;
|
| + deopt_location_ = 0;
|
| }
|
| - void set_deopt_location(int location) { deopt_location_ = location; }
|
| - const char* bailout_reason() const { return bailout_reason_; }
|
|
|
| static inline bool is_js_function_tag(Logger::LogEventsAndTags tag);
|
|
|
| @@ -118,6 +127,7 @@ class CodeEntry {
|
| static const char* const kEmptyNamePrefix;
|
| static const char* const kEmptyResourceName;
|
| static const char* const kEmptyBailoutReason;
|
| + static const char* const kNoDeoptReason;
|
|
|
| private:
|
| class TagField : public BitField<Logger::LogEventsAndTags, 0, 8> {};
|
| @@ -146,6 +156,17 @@ class CodeEntry {
|
| class ProfileTree;
|
|
|
| class ProfileNode {
|
| + private:
|
| + struct DeoptInfo {
|
| + DeoptInfo(const char* deopt_reason, int deopt_location)
|
| + : deopt_reason(deopt_reason), deopt_location(deopt_location) {}
|
| + DeoptInfo(const DeoptInfo& info)
|
| + : deopt_reason(info.deopt_reason),
|
| + deopt_location(info.deopt_location) {}
|
| + const char* deopt_reason;
|
| + int deopt_location;
|
| + };
|
| +
|
| public:
|
| inline ProfileNode(ProfileTree* tree, CodeEntry* entry);
|
|
|
| @@ -162,6 +183,8 @@ class ProfileNode {
|
| unsigned int GetHitLineCount() const { return line_ticks_.occupancy(); }
|
| bool GetLineTicks(v8::CpuProfileNode::LineTick* entries,
|
| unsigned int length) const;
|
| + void CollectDeoptInfo(CodeEntry* entry);
|
| + const List<DeoptInfo>& deopt_infos() const { return deopt_infos_; }
|
|
|
| void Print(int indent);
|
|
|
| @@ -186,6 +209,7 @@ class ProfileNode {
|
| unsigned id_;
|
| HashMap line_ticks_;
|
|
|
| + List<DeoptInfo> deopt_infos_;
|
| DISALLOW_COPY_AND_ASSIGN(ProfileNode);
|
| };
|
|
|
|
|