OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
932 int present_flags_; // All flags that are in any value in the HValueMap. | 932 int present_flags_; // All flags that are in any value in the HValueMap. |
933 HValueMapListElement* array_; // Primary store - contains the first value | 933 HValueMapListElement* array_; // Primary store - contains the first value |
934 // with a given hash. Colliding elements are stored in linked lists. | 934 // with a given hash. Colliding elements are stored in linked lists. |
935 HValueMapListElement* lists_; // The linked lists containing hash collisions. | 935 HValueMapListElement* lists_; // The linked lists containing hash collisions. |
936 int free_list_head_; // Unused elements in lists_ are on the free list. | 936 int free_list_head_; // Unused elements in lists_ are on the free list. |
937 }; | 937 }; |
938 | 938 |
939 | 939 |
940 class HStatistics: public Malloced { | 940 class HStatistics: public Malloced { |
941 public: | 941 public: |
| 942 void Initialize(CompilationInfo* info); |
942 void Print(); | 943 void Print(); |
943 void SaveTiming(const char* name, int64_t ticks, unsigned size); | 944 void SaveTiming(const char* name, int64_t ticks, unsigned size); |
944 static HStatistics* Instance() { | 945 static HStatistics* Instance() { |
945 static SetOncePointer<HStatistics> instance; | 946 static SetOncePointer<HStatistics> instance; |
946 if (!instance.is_set()) { | 947 if (!instance.is_set()) { |
947 instance.set(new HStatistics()); | 948 instance.set(new HStatistics()); |
948 } | 949 } |
949 return instance.get(); | 950 return instance.get(); |
950 } | 951 } |
951 | 952 |
952 private: | 953 private: |
953 | 954 |
954 HStatistics() | 955 HStatistics() |
955 : timing_(5), | 956 : timing_(5), |
956 names_(5), | 957 names_(5), |
957 sizes_(5), | 958 sizes_(5), |
958 total_(0), | 959 total_(0), |
959 total_size_(0), | 960 total_size_(0), |
960 full_code_gen_(0) { } | 961 full_code_gen_(0), |
| 962 source_size_(0) { } |
961 | 963 |
962 List<int64_t> timing_; | 964 List<int64_t> timing_; |
963 List<const char*> names_; | 965 List<const char*> names_; |
964 List<unsigned> sizes_; | 966 List<unsigned> sizes_; |
965 int64_t total_; | 967 int64_t total_; |
966 unsigned total_size_; | 968 unsigned total_size_; |
967 int64_t full_code_gen_; | 969 int64_t full_code_gen_; |
| 970 double source_size_; |
968 }; | 971 }; |
969 | 972 |
970 | 973 |
971 class HPhase BASE_EMBEDDED { | 974 class HPhase BASE_EMBEDDED { |
972 public: | 975 public: |
973 static const char* const kFullCodeGen; | 976 static const char* const kFullCodeGen; |
974 static const char* const kTotal; | 977 static const char* const kTotal; |
975 | 978 |
976 explicit HPhase(const char* name) { Begin(name, NULL, NULL, NULL); } | 979 explicit HPhase(const char* name) { Begin(name, NULL, NULL, NULL); } |
977 HPhase(const char* name, HGraph* graph) { | 980 HPhase(const char* name, HGraph* graph) { |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1091 const char* filename_; | 1094 const char* filename_; |
1092 HeapStringAllocator string_allocator_; | 1095 HeapStringAllocator string_allocator_; |
1093 StringStream trace_; | 1096 StringStream trace_; |
1094 int indent_; | 1097 int indent_; |
1095 }; | 1098 }; |
1096 | 1099 |
1097 | 1100 |
1098 } } // namespace v8::internal | 1101 } } // namespace v8::internal |
1099 | 1102 |
1100 #endif // V8_HYDROGEN_H_ | 1103 #endif // V8_HYDROGEN_H_ |
OLD | NEW |