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

Side by Side Diff: runtime/vm/raw_object.h

Issue 15779006: Add deoptimization history to optimized functions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
« runtime/vm/flow_graph_inliner.cc ('K') | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_RAW_OBJECT_H_ 5 #ifndef VM_RAW_OBJECT_H_
6 #define VM_RAW_OBJECT_H_ 6 #define VM_RAW_OBJECT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #include "vm/token.h" 10 #include "vm/token.h"
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 597
598 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } 598 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); }
599 RawString* name_; 599 RawString* name_;
600 RawObject* owner_; // Class or patch class or mixin class 600 RawObject* owner_; // Class or patch class or mixin class
601 // where this function is defined. 601 // where this function is defined.
602 RawAbstractType* result_type_; 602 RawAbstractType* result_type_;
603 RawArray* parameter_types_; 603 RawArray* parameter_types_;
604 RawArray* parameter_names_; 604 RawArray* parameter_names_;
605 RawCode* code_; // Compiled code for the function. 605 RawCode* code_; // Compiled code for the function.
606 RawCode* unoptimized_code_; // Unoptimized code, keep it after optimization. 606 RawCode* unoptimized_code_; // Unoptimized code, keep it after optimization.
607 RawArray* deopt_history_; // Deopt Ids of past deoptimizations.
607 RawObject* data_; // Additional data specific to the function kind. 608 RawObject* data_; // Additional data specific to the function kind.
608 RawObject** to() { 609 RawObject** to() {
609 return reinterpret_cast<RawObject**>(&ptr()->data_); 610 return reinterpret_cast<RawObject**>(&ptr()->data_);
610 } 611 }
611 612
612 intptr_t token_pos_; 613 intptr_t token_pos_;
613 intptr_t end_token_pos_; 614 intptr_t end_token_pos_;
614 intptr_t usage_counter_; // Incremented while function is running. 615 intptr_t usage_counter_; // Incremented while function is running.
615 int16_t num_fixed_parameters_; 616 int16_t num_fixed_parameters_;
616 int16_t num_optional_parameters_; // > 0: positional; < 0: named. 617 int16_t num_optional_parameters_; // > 0: positional; < 0: named.
617 uint16_t deoptimization_counter_; 618 int16_t deoptimization_counter_;
srdjan 2013/05/28 10:48:49 Please document what negative counter means.
Florian Schneider 2013/05/29 08:50:20 It should never be negative. I just made this cons
618 uint16_t kind_tag_; 619 uint16_t kind_tag_;
619 uint16_t optimized_instruction_count_; 620 uint16_t optimized_instruction_count_;
620 uint16_t optimized_call_site_count_; 621 uint16_t optimized_call_site_count_;
621 }; 622 };
622 623
623 624
624 class RawClosureData : public RawObject { 625 class RawClosureData : public RawObject {
625 private: 626 private:
626 RAW_HEAP_OBJECT_IMPLEMENTATION(ClosureData); 627 RAW_HEAP_OBJECT_IMPLEMENTATION(ClosureData);
627 628
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
1679 // Make sure this is updated when new TypedData types are added. 1680 // Make sure this is updated when new TypedData types are added.
1680 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 12); 1681 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 12);
1681 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 13); 1682 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 13);
1682 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 12); 1683 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 12);
1683 return (kNullCid - kTypedDataInt8ArrayCid); 1684 return (kNullCid - kTypedDataInt8ArrayCid);
1684 } 1685 }
1685 1686
1686 } // namespace dart 1687 } // namespace dart
1687 1688
1688 #endif // VM_RAW_OBJECT_H_ 1689 #endif // VM_RAW_OBJECT_H_
OLDNEW
« runtime/vm/flow_graph_inliner.cc ('K') | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698