Reviewers: Michael Starzinger, Toon Verwaest,

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

BUG=

Please review this at https://codereview.chromium.org/20084003/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/code-stubs-hydrogen.cc
  M src/compiler.cc
  M src/flag-definitions.h


Index: src/code-stubs-hydrogen.cc
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc
index 1b341b526676e2408e9bba360e6f70a3ece7fd3b..7d9a00c14316b4d012339399c4aee4293d1c6b16 100644
--- a/src/code-stubs-hydrogen.cc
+++ b/src/code-stubs-hydrogen.cc
@@ -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);
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index c2995773e3fe31d250f1e8ab76e82b848885a28d..2002837e43919b790416bb7d6c94b18bd75a05fb 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1249,7 +1249,7 @@ 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 &&
+  return ((FLAG_trace_hydrogen || FLAG_trace_hydrogen_stubs) &&
OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL);
 }

Index: src/flag-definitions.h
diff --git a/src/flag-definitions.h b/src/flag-definitions.h
index 1b0e33c15b18a3b784c5e0ff0d120fb4f7235c44..d7d2f4a378f903830883ff73cdb69d30528c810e 100644
--- a/src/flag-definitions.h
+++ b/src/flag-definitions.h
@@ -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")


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to