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

Side by Side Diff: src/hydrogen.h

Issue 20204005: Make standalone D8 trace to single hydrogen.cfg file. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addessed comments by Ben Titzer. Created 7 years, 5 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/flag-definitions.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2067 matching lines...) Expand 10 before | Expand all | Expand 10 after
2078 HGraph* graph_; 2078 HGraph* graph_;
2079 2079
2080 DISALLOW_COPY_AND_ASSIGN(HPhase); 2080 DISALLOW_COPY_AND_ASSIGN(HPhase);
2081 }; 2081 };
2082 2082
2083 2083
2084 class HTracer: public Malloced { 2084 class HTracer: public Malloced {
2085 public: 2085 public:
2086 explicit HTracer(int isolate_id) 2086 explicit HTracer(int isolate_id)
2087 : trace_(&string_allocator_), indent_(0) { 2087 : trace_(&string_allocator_), indent_(0) {
2088 OS::SNPrintF(filename_, 2088 if (FLAG_trace_hydrogen_file == NULL) {
2089 "hydrogen-%d-%d.cfg", 2089 OS::SNPrintF(filename_,
2090 OS::GetCurrentProcessId(), 2090 "hydrogen-%d-%d.cfg",
2091 isolate_id); 2091 OS::GetCurrentProcessId(),
2092 isolate_id);
2093 } else {
2094 OS::StrNCpy(filename_, FLAG_trace_hydrogen_file, filename_.length());
2095 }
2092 WriteChars(filename_.start(), "", 0, false); 2096 WriteChars(filename_.start(), "", 0, false);
2093 } 2097 }
2094 2098
2095 void TraceCompilation(CompilationInfo* info); 2099 void TraceCompilation(CompilationInfo* info);
2096 void TraceHydrogen(const char* name, HGraph* graph); 2100 void TraceHydrogen(const char* name, HGraph* graph);
2097 void TraceLithium(const char* name, LChunk* chunk); 2101 void TraceLithium(const char* name, LChunk* chunk);
2098 void TraceLiveRanges(const char* name, LAllocator* allocator); 2102 void TraceLiveRanges(const char* name, LAllocator* allocator);
2099 2103
2100 private: 2104 private:
2101 class Tag BASE_EMBEDDED { 2105 class Tag BASE_EMBEDDED {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
2159 EmbeddedVector<char, 64> filename_; 2163 EmbeddedVector<char, 64> filename_;
2160 HeapStringAllocator string_allocator_; 2164 HeapStringAllocator string_allocator_;
2161 StringStream trace_; 2165 StringStream trace_;
2162 int indent_; 2166 int indent_;
2163 }; 2167 };
2164 2168
2165 2169
2166 } } // namespace v8::internal 2170 } } // namespace v8::internal
2167 2171
2168 #endif // V8_HYDROGEN_H_ 2172 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698