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

Side by Side Diff: src/log.cc

Issue 1104303002: fix assertion in Logger::CurrentTimeEvent with --prof (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/log.h" 5 #include "src/log.h"
6 6
7 #include <cstdarg> 7 #include <cstdarg>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/v8.h" 10 #include "src/v8.h"
(...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 if (!log_->IsEnabled() || !FLAG_log_internal_timer_events) return; 897 if (!log_->IsEnabled() || !FLAG_log_internal_timer_events) return;
898 Log::MessageBuilder msg(log_); 898 Log::MessageBuilder msg(log_);
899 int since_epoch = static_cast<int>(timer_.Elapsed().InMicroseconds()); 899 int since_epoch = static_cast<int>(timer_.Elapsed().InMicroseconds());
900 msg.Append("code-deopt,%ld,%d", since_epoch, code->CodeSize()); 900 msg.Append("code-deopt,%ld,%d", since_epoch, code->CodeSize());
901 msg.WriteToLogFile(); 901 msg.WriteToLogFile();
902 } 902 }
903 903
904 904
905 void Logger::CurrentTimeEvent() { 905 void Logger::CurrentTimeEvent() {
906 if (!log_->IsEnabled()) return; 906 if (!log_->IsEnabled()) return;
907 DCHECK(FLAG_log_internal_timer_events); 907 DCHECK(FLAG_log_timer_events || FLAG_prof_cpp);
908 Log::MessageBuilder msg(log_); 908 Log::MessageBuilder msg(log_);
909 int since_epoch = static_cast<int>(timer_.Elapsed().InMicroseconds()); 909 int since_epoch = static_cast<int>(timer_.Elapsed().InMicroseconds());
910 msg.Append("current-time,%ld", since_epoch); 910 msg.Append("current-time,%ld", since_epoch);
911 msg.WriteToLogFile(); 911 msg.WriteToLogFile();
912 } 912 }
913 913
914 914
915 void Logger::TimerEvent(Logger::StartEnd se, const char* name) { 915 void Logger::TimerEvent(Logger::StartEnd se, const char* name) {
916 if (!log_->IsEnabled()) return; 916 if (!log_->IsEnabled()) return;
917 DCHECK(FLAG_log_internal_timer_events); 917 DCHECK(FLAG_log_internal_timer_events);
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after
1915 if (jit_logger_) { 1915 if (jit_logger_) {
1916 removeCodeEventListener(jit_logger_); 1916 removeCodeEventListener(jit_logger_);
1917 delete jit_logger_; 1917 delete jit_logger_;
1918 jit_logger_ = NULL; 1918 jit_logger_ = NULL;
1919 } 1919 }
1920 1920
1921 return log_->Close(); 1921 return log_->Close();
1922 } 1922 }
1923 1923
1924 } } // namespace v8::internal 1924 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698