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

Unified Diff: runtime/vm/object.h

Issue 11567012: Store optimized flow graph statistics on the function itself. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address Srdjan's comments Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 0acf40a3caccfa70bc79fcc6d7221a98ed0c58cb..f5dbec44cd335e26ff48cbe7cfbc3f2d21bcd2bc 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -1288,6 +1288,29 @@ class Function : public Object {
raw_ptr()->deoptimization_counter_ = value;
}
+ static const intptr_t kMaxInstructionCount = (1 << 16) - 1;
+ intptr_t optimized_instruction_count() const {
+ return raw_ptr()->optimized_instruction_count_;
+ }
+ void set_optimized_instruction_count(intptr_t value) const {
+ ASSERT(value >= 0);
+ if (value > kMaxInstructionCount) {
+ value = kMaxInstructionCount;
+ }
+ raw_ptr()->optimized_instruction_count_ = static_cast<uint16_t>(value);
+ }
+
+ intptr_t optimized_call_site_count() const {
+ return raw_ptr()->optimized_call_site_count_;
+ }
+ void set_optimized_call_site_count(intptr_t value) const {
+ ASSERT(value >= 0);
+ if (value > kMaxInstructionCount) {
+ value = kMaxInstructionCount;
+ }
+ raw_ptr()->optimized_call_site_count_ = static_cast<uint16_t>(value);
+ }
+
bool is_optimizable() const;
void set_is_optimizable(bool value) const;
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698