| 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 : public CompilationPhase { |
| 1948 public: | 1952 public: |
| 1949 static const char* const kFullCodeGen; | |
| 1950 | |
| 1951 HPhase(const char* name, Isolate* isolate, Zone* zone); | |
| 1952 HPhase(const char* name, HGraph* graph); | 1953 HPhase(const char* name, HGraph* graph); |
| 1953 HPhase(const char* name, LChunk* chunk); | |
| 1954 HPhase(const char* name, LAllocator* allocator); | |
| 1955 ~HPhase(); | 1954 ~HPhase(); |
| 1956 | 1955 |
| 1957 private: | 1956 private: |
| 1958 void Init(Isolate* isolate, | |
| 1959 const char* name, | |
| 1960 Zone* zone, | |
| 1961 HGraph* graph, | |
| 1962 LChunk* chunk, | |
| 1963 LAllocator* allocator); | |
| 1964 | |
| 1965 Isolate* isolate_; | |
| 1966 const char* name_; | |
| 1967 Zone* zone_; | |
| 1968 HGraph* graph_; | 1957 HGraph* graph_; |
| 1969 LChunk* chunk_; | |
| 1970 LAllocator* allocator_; | |
| 1971 int64_t start_ticks_; | |
| 1972 unsigned start_allocation_size_; | |
| 1973 }; | 1958 }; |
| 1974 | 1959 |
| 1975 | 1960 |
| 1976 class HTracer: public Malloced { | 1961 class HTracer: public Malloced { |
| 1977 public: | 1962 public: |
| 1978 explicit HTracer(int isolate_id) | 1963 explicit HTracer(int isolate_id) |
| 1979 : trace_(&string_allocator_), indent_(0) { | 1964 : trace_(&string_allocator_), indent_(0) { |
| 1980 OS::SNPrintF(filename_, | 1965 OS::SNPrintF(filename_, |
| 1981 "hydrogen-%d-%d.cfg", | 1966 "hydrogen-%d-%d.cfg", |
| 1982 OS::GetCurrentProcessId(), | 1967 OS::GetCurrentProcessId(), |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2051 EmbeddedVector<char, 64> filename_; | 2036 EmbeddedVector<char, 64> filename_; |
| 2052 HeapStringAllocator string_allocator_; | 2037 HeapStringAllocator string_allocator_; |
| 2053 StringStream trace_; | 2038 StringStream trace_; |
| 2054 int indent_; | 2039 int indent_; |
| 2055 }; | 2040 }; |
| 2056 | 2041 |
| 2057 | 2042 |
| 2058 } } // namespace v8::internal | 2043 } } // namespace v8::internal |
| 2059 | 2044 |
| 2060 #endif // V8_HYDROGEN_H_ | 2045 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |