OLD | NEW |
1 // Copyright 2010 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 |
11 // with the distribution. | 11 // with the distribution. |
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
899 HValueMapListElement* array_; // Primary store - contains the first value | 899 HValueMapListElement* array_; // Primary store - contains the first value |
900 // with a given hash. Colliding elements are stored in linked lists. | 900 // with a given hash. Colliding elements are stored in linked lists. |
901 HValueMapListElement* lists_; // The linked lists containing hash collisions. | 901 HValueMapListElement* lists_; // The linked lists containing hash collisions. |
902 int free_list_head_; // Unused elements in lists_ are on the free list. | 902 int free_list_head_; // Unused elements in lists_ are on the free list. |
903 }; | 903 }; |
904 | 904 |
905 | 905 |
906 class HStatistics: public Malloced { | 906 class HStatistics: public Malloced { |
907 public: | 907 public: |
908 void Print(); | 908 void Print(); |
909 void SaveTiming(const char* name, int64_t ticks); | 909 void SaveTiming(const char* name, int64_t ticks, unsigned size); |
910 static HStatistics* Instance() { | 910 static HStatistics* Instance() { |
911 static SetOncePointer<HStatistics> instance; | 911 static SetOncePointer<HStatistics> instance; |
912 if (!instance.is_set()) { | 912 if (!instance.is_set()) { |
913 instance.set(new HStatistics()); | 913 instance.set(new HStatistics()); |
914 } | 914 } |
915 return instance.get(); | 915 return instance.get(); |
916 } | 916 } |
917 | 917 |
918 private: | 918 private: |
919 | 919 |
920 HStatistics() : timing_(5), names_(5), total_(0), full_code_gen_(0) { } | 920 HStatistics() |
| 921 : timing_(5), |
| 922 names_(5), |
| 923 sizes_(5), |
| 924 total_(0), |
| 925 total_size_(0), |
| 926 full_code_gen_(0) { } |
921 | 927 |
922 List<int64_t> timing_; | 928 List<int64_t> timing_; |
923 List<const char*> names_; | 929 List<const char*> names_; |
| 930 List<unsigned> sizes_; |
924 int64_t total_; | 931 int64_t total_; |
| 932 unsigned total_size_; |
925 int64_t full_code_gen_; | 933 int64_t full_code_gen_; |
926 }; | 934 }; |
927 | 935 |
928 | 936 |
929 class HPhase BASE_EMBEDDED { | 937 class HPhase BASE_EMBEDDED { |
930 public: | 938 public: |
931 static const char* const kFullCodeGen; | 939 static const char* const kFullCodeGen; |
932 static const char* const kTotal; | 940 static const char* const kTotal; |
933 | 941 |
934 explicit HPhase(const char* name) { Begin(name, NULL, NULL, NULL); } | 942 explicit HPhase(const char* name) { Begin(name, NULL, NULL, NULL); } |
(...skipping 16 matching lines...) Expand all Loading... |
951 HGraph* graph, | 959 HGraph* graph, |
952 LChunk* chunk, | 960 LChunk* chunk, |
953 LAllocator* allocator); | 961 LAllocator* allocator); |
954 void End() const; | 962 void End() const; |
955 | 963 |
956 int64_t start_; | 964 int64_t start_; |
957 const char* name_; | 965 const char* name_; |
958 HGraph* graph_; | 966 HGraph* graph_; |
959 LChunk* chunk_; | 967 LChunk* chunk_; |
960 LAllocator* allocator_; | 968 LAllocator* allocator_; |
| 969 unsigned start_allocation_size_; |
961 }; | 970 }; |
962 | 971 |
963 | 972 |
964 class HTracer: public Malloced { | 973 class HTracer: public Malloced { |
965 public: | 974 public: |
966 void TraceCompilation(FunctionLiteral* function); | 975 void TraceCompilation(FunctionLiteral* function); |
967 void TraceHydrogen(const char* name, HGraph* graph); | 976 void TraceHydrogen(const char* name, HGraph* graph); |
968 void TraceLithium(const char* name, LChunk* chunk); | 977 void TraceLithium(const char* name, LChunk* chunk); |
969 void TraceLiveRanges(const char* name, LAllocator* allocator); | 978 void TraceLiveRanges(const char* name, LAllocator* allocator); |
970 | 979 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1048 const char* filename_; | 1057 const char* filename_; |
1049 HeapStringAllocator string_allocator_; | 1058 HeapStringAllocator string_allocator_; |
1050 StringStream trace_; | 1059 StringStream trace_; |
1051 int indent_; | 1060 int indent_; |
1052 }; | 1061 }; |
1053 | 1062 |
1054 | 1063 |
1055 } } // namespace v8::internal | 1064 } } // namespace v8::internal |
1056 | 1065 |
1057 #endif // V8_HYDROGEN_H_ | 1066 #endif // V8_HYDROGEN_H_ |
OLD | NEW |