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

Side by Side Diff: src/log.cc

Issue 20482003: Remove --prof-auto flag (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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') | src/log-utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1980 matching lines...) Expand 10 before | Expand all | Expand 10 after
1991 bool Logger::SetUp(Isolate* isolate) { 1991 bool Logger::SetUp(Isolate* isolate) {
1992 // Tests and EnsureInitialize() can call this twice in a row. It's harmless. 1992 // Tests and EnsureInitialize() can call this twice in a row. It's harmless.
1993 if (is_initialized_) return true; 1993 if (is_initialized_) return true;
1994 is_initialized_ = true; 1994 is_initialized_ = true;
1995 1995
1996 // --ll-prof implies --log-code and --log-snapshot-positions. 1996 // --ll-prof implies --log-code and --log-snapshot-positions.
1997 if (FLAG_ll_prof) { 1997 if (FLAG_ll_prof) {
1998 FLAG_log_snapshot_positions = true; 1998 FLAG_log_snapshot_positions = true;
1999 } 1999 }
2000 2000
2001 // --prof_lazy controls --log-code, implies --noprof_auto. 2001 // --prof_lazy controls --log-code.
2002 if (FLAG_prof_lazy) { 2002 if (FLAG_prof_lazy) {
2003 FLAG_log_code = false; 2003 FLAG_log_code = false;
2004 FLAG_prof_auto = false;
2005 } 2004 }
2006 2005
2007 SmartArrayPointer<const char> log_file_name = 2006 SmartArrayPointer<const char> log_file_name =
2008 PrepareLogFileName(FLAG_logfile); 2007 PrepareLogFileName(FLAG_logfile);
2009 log_->Initialize(*log_file_name); 2008 log_->Initialize(*log_file_name);
2010 2009
2011 if (FLAG_ll_prof) { 2010 if (FLAG_ll_prof) {
2012 ll_logger_ = new LowLevelLogger(*log_file_name); 2011 ll_logger_ = new LowLevelLogger(*log_file_name);
2013 } 2012 }
2014 2013
2015 ticker_ = new Ticker(isolate, kSamplingIntervalMs); 2014 ticker_ = new Ticker(isolate, kSamplingIntervalMs);
2016 2015
2017 if (Log::InitLogAtStart()) { 2016 if (Log::InitLogAtStart()) {
2018 logging_nesting_ = 1; 2017 logging_nesting_ = 1;
2019 } 2018 }
2020 2019
2021 if (FLAG_prof) { 2020 if (FLAG_prof) {
2022 profiler_ = new Profiler(isolate); 2021 profiler_ = new Profiler(isolate);
2023 if (!FLAG_prof_auto) { 2022 if (FLAG_prof_lazy) {
2024 profiler_->pause(); 2023 profiler_->pause();
2025 } else { 2024 } else {
2026 logging_nesting_ = 1; 2025 logging_nesting_ = 1;
2027 }
2028 if (!FLAG_prof_lazy) {
2029 profiler_->Engage(); 2026 profiler_->Engage();
2030 } 2027 }
2031 } 2028 }
2032 2029
2033 if (FLAG_log_internal_timer_events || FLAG_prof) epoch_ = OS::Ticks(); 2030 if (FLAG_log_internal_timer_events || FLAG_prof) epoch_ = OS::Ticks();
2034 2031
2035 return true; 2032 return true;
2036 } 2033 }
2037 2034
2038 2035
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
2081 2078
2082 if (jit_logger_) { 2079 if (jit_logger_) {
2083 delete jit_logger_; 2080 delete jit_logger_;
2084 jit_logger_ = NULL; 2081 jit_logger_ = NULL;
2085 } 2082 }
2086 2083
2087 return log_->Close(); 2084 return log_->Close();
2088 } 2085 }
2089 2086
2090 } } // namespace v8::internal 2087 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/log-utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698