Commit 54cc4922 authored by titzer@chromium.org's avatar titzer@chromium.org

Add --trace-hydrogen-stubs flag (default = false).

BUG=
R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/20084003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15859 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 6b83c868
......@@ -129,7 +129,7 @@ bool CodeStubGraphBuilderBase::BuildGraph() {
// Update the static counter each time a new code stub is generated.
isolate()->counters()->code_stubs()->Increment();
if (FLAG_trace_hydrogen) {
if (FLAG_trace_hydrogen_stubs) {
const char* name = CodeStub::MajorName(stub()->MajorKey(), false);
PrintF("-----------------------------------------------------------\n");
PrintF("Compiling stub %s using hydrogen\n", name);
......
......@@ -1247,10 +1247,13 @@ CompilationPhase::~CompilationPhase() {
bool CompilationPhase::ShouldProduceTraceOutput() const {
// Produce trace output if flag is set so that the first letter of the
// phase name matches the command line parameter FLAG_trace_phase.
return (FLAG_trace_hydrogen &&
OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL);
// Trace if the appropriate trace flag is set and the phase name's first
// character is in the FLAG_trace_phase command line parameter.
bool tracing_on = info()->IsStub() ?
FLAG_trace_hydrogen_stubs :
FLAG_trace_hydrogen;
return (tracing_on &&
OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL);
}
} } // namespace v8::internal
......@@ -236,7 +236,8 @@ DEFINE_bool(collect_megamorphic_maps_from_stub_cache,
"crankshaft harvests type feedback from stub cache")
DEFINE_bool(hydrogen_stats, false, "print statistics for hydrogen")
DEFINE_bool(trace_hydrogen, false, "trace generated hydrogen to file")
DEFINE_string(trace_phase, "Z", "trace generated IR for specified phases")
DEFINE_bool(trace_hydrogen_stubs, false, "trace generated hydrogen for stubs")
DEFINE_string(trace_phase, "HLZ", "trace generated IR for specified phases")
DEFINE_bool(trace_inlining, false, "trace inlining decisions")
DEFINE_bool(trace_alloc, false, "trace register allocator")
DEFINE_bool(trace_all_uses, false, "trace all use positions")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment