Reviewers: loislo, Yang,

Description:
Remove --prof-auto flag

There is already --prof-lazy flag which should be enough.

BUG=None

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

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

Affected files:
  M src/flag-definitions.h
  M src/log-utils.cc
  M src/log.cc
  M test/cctest/test-log.cc


Index: src/flag-definitions.h
diff --git a/src/flag-definitions.h b/src/flag-definitions.h
index 8888aed26c04d41138d7deb4bd75a4f5caa7c674..01c397651e4b11db489c01029bb42db76a1a34f5 100644
--- a/src/flag-definitions.h
+++ b/src/flag-definitions.h
@@ -744,11 +744,9 @@ DEFINE_bool(log_snapshot_positions, false,
 DEFINE_bool(log_suspect, false, "Log suspect operations.")
 DEFINE_bool(prof, false,
             "Log statistical profiling information (implies --log-code).")
-DEFINE_bool(prof_auto, true,
-            "Used with --prof, starts profiling automatically")
 DEFINE_bool(prof_lazy, false,
             "Used with --prof, only does sampling and logging"
-            " when profiler is active (implies --noprof_auto).")
+            " when profiler is active.")
 DEFINE_bool(prof_browser_mode, true,
"Used with --prof, turns on browser-compatible mode for profiling.")
 DEFINE_bool(log_regexp, false, "Log regular expression execution.")
Index: src/log-utils.cc
diff --git a/src/log-utils.cc b/src/log-utils.cc
index d8d8f5934f72e65a0cc6e9ed2a4c76d5269923c9..6bba8823e30333330afdd07a5b2630a309950057 100644
--- a/src/log-utils.cc
+++ b/src/log-utils.cc
@@ -66,10 +66,9 @@ void Log::Initialize(const char* log_file_name) {
   // --prof implies --log-code.
   if (FLAG_prof) FLAG_log_code = true;

-  // --prof_lazy controls --log-code, implies --noprof_auto.
+  // --prof_lazy controls --log-code.
   if (FLAG_prof_lazy) {
     FLAG_log_code = false;
-    FLAG_prof_auto = false;
   }

   // If we're logging anything, we need to open the log file.
Index: src/log.cc
diff --git a/src/log.cc b/src/log.cc
index 520723e342302090c715ab4a6ef2aef4d87a8b93..01729d0d1b30f06747ba9959dee8493c9524562f 100644
--- a/src/log.cc
+++ b/src/log.cc
@@ -1998,10 +1998,9 @@ bool Logger::SetUp(Isolate* isolate) {
     FLAG_log_snapshot_positions = true;
   }

-  // --prof_lazy controls --log-code, implies --noprof_auto.
+  // --prof_lazy controls --log-code.
   if (FLAG_prof_lazy) {
     FLAG_log_code = false;
-    FLAG_prof_auto = false;
   }

   SmartArrayPointer<const char> log_file_name =
@@ -2020,12 +2019,10 @@ bool Logger::SetUp(Isolate* isolate) {

   if (FLAG_prof) {
     profiler_ = new Profiler(isolate);
-    if (!FLAG_prof_auto) {
+    if (FLAG_prof_lazy) {
       profiler_->pause();
     } else {
       logging_nesting_ = 1;
-    }
-    if (!FLAG_prof_lazy) {
       profiler_->Engage();
     }
   }
Index: test/cctest/test-log.cc
diff --git a/test/cctest/test-log.cc b/test/cctest/test-log.cc
index bf1151e59b4175b0c55e98083fcb1a5dc3badf7a..8bcb5f7d2942d4ab865a9adc8695d8f29b6899ad 100644
--- a/test/cctest/test-log.cc
+++ b/test/cctest/test-log.cc
@@ -60,7 +60,6 @@ class ScopedLoggerInitializer {
       : saved_log_(i::FLAG_log),
         saved_prof_lazy_(i::FLAG_prof_lazy),
         saved_prof_(i::FLAG_prof),
-        saved_prof_auto_(i::FLAG_prof_auto),
         temp_file_(NULL),
         // Need to run this prior to creating the scope.
         trick_to_run_init_flags_(init_flags_(prof_lazy)),
@@ -76,7 +75,6 @@ class ScopedLoggerInitializer {
     if (temp_file_ != NULL) fclose(temp_file_);
     i::FLAG_prof_lazy = saved_prof_lazy_;
     i::FLAG_prof = saved_prof_;
-    i::FLAG_prof_auto = saved_prof_auto_;
     i::FLAG_log = saved_log_;
   }

@@ -97,7 +95,6 @@ class ScopedLoggerInitializer {
     i::FLAG_log = true;
     i::FLAG_prof = true;
     i::FLAG_prof_lazy = prof_lazy;
-    i::FLAG_prof_auto = false;
     i::FLAG_logfile = i::Log::kLogToTemporaryFile;
     return prof_lazy;
   }
@@ -105,7 +102,6 @@ class ScopedLoggerInitializer {
   const bool saved_log_;
   const bool saved_prof_lazy_;
   const bool saved_prof_;
-  const bool saved_prof_auto_;
   FILE* temp_file_;
   const bool trick_to_run_init_flags_;
   v8::HandleScope scope_;


--
--
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