OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1916 optimize_graph_(0), | 1916 optimize_graph_(0), |
1917 generate_code_(0), | 1917 generate_code_(0), |
1918 total_size_(0), | 1918 total_size_(0), |
1919 full_code_gen_(0), | 1919 full_code_gen_(0), |
1920 source_size_(0) { } | 1920 source_size_(0) { } |
1921 | 1921 |
1922 void Initialize(CompilationInfo* info); | 1922 void Initialize(CompilationInfo* info); |
1923 void Print(); | 1923 void Print(); |
1924 void SaveTiming(const char* name, int64_t ticks, unsigned size); | 1924 void SaveTiming(const char* name, int64_t ticks, unsigned size); |
1925 | 1925 |
| 1926 void IncrementFullCodeGen(int64_t full_code_gen) { |
| 1927 full_code_gen_ += full_code_gen; |
| 1928 } |
| 1929 |
1926 void IncrementSubtotals(int64_t create_graph, | 1930 void IncrementSubtotals(int64_t create_graph, |
1927 int64_t optimize_graph, | 1931 int64_t optimize_graph, |
1928 int64_t generate_code) { | 1932 int64_t generate_code) { |
1929 create_graph_ += create_graph; | 1933 create_graph_ += create_graph; |
1930 optimize_graph_ += optimize_graph; | 1934 optimize_graph_ += optimize_graph; |
1931 generate_code_ += generate_code; | 1935 generate_code_ += generate_code; |
1932 } | 1936 } |
1933 | 1937 |
1934 private: | 1938 private: |
1935 List<int64_t> timing_; | 1939 List<int64_t> timing_; |
1936 List<const char*> names_; | 1940 List<const char*> names_; |
1937 List<unsigned> sizes_; | 1941 List<unsigned> sizes_; |
1938 int64_t create_graph_; | 1942 int64_t create_graph_; |
1939 int64_t optimize_graph_; | 1943 int64_t optimize_graph_; |
1940 int64_t generate_code_; | 1944 int64_t generate_code_; |
1941 unsigned total_size_; | 1945 unsigned total_size_; |
1942 int64_t full_code_gen_; | 1946 int64_t full_code_gen_; |
1943 double source_size_; | 1947 double source_size_; |
1944 }; | 1948 }; |
1945 | 1949 |
1946 | 1950 |
1947 class HPhase BASE_EMBEDDED { | 1951 class HPhase BASE_EMBEDDED { |
1948 public: | 1952 public: |
1949 static const char* const kFullCodeGen; | |
1950 | |
1951 HPhase(const char* name, Isolate* isolate, Zone* zone); | 1953 HPhase(const char* name, Isolate* isolate, Zone* zone); |
1952 HPhase(const char* name, HGraph* graph); | 1954 HPhase(const char* name, HGraph* graph); |
1953 HPhase(const char* name, LChunk* chunk); | 1955 HPhase(const char* name, LChunk* chunk); |
1954 HPhase(const char* name, LAllocator* allocator); | 1956 HPhase(const char* name, LAllocator* allocator); |
1955 ~HPhase(); | 1957 ~HPhase(); |
1956 | 1958 |
1957 private: | 1959 private: |
1958 void Init(Isolate* isolate, | 1960 void Init(Isolate* isolate, |
1959 const char* name, | 1961 const char* name, |
1960 Zone* zone, | 1962 Zone* zone, |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2051 EmbeddedVector<char, 64> filename_; | 2053 EmbeddedVector<char, 64> filename_; |
2052 HeapStringAllocator string_allocator_; | 2054 HeapStringAllocator string_allocator_; |
2053 StringStream trace_; | 2055 StringStream trace_; |
2054 int indent_; | 2056 int indent_; |
2055 }; | 2057 }; |
2056 | 2058 |
2057 | 2059 |
2058 } } // namespace v8::internal | 2060 } } // namespace v8::internal |
2059 | 2061 |
2060 #endif // V8_HYDROGEN_H_ | 2062 #endif // V8_HYDROGEN_H_ |
OLD | NEW |