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

Side by Side Diff: src/log.cc

Issue 1128023005: Remove static logging of memory allocations (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 | « src/log.h ('k') | 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 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after
1072 1072
1073 1073
1074 void Logger::DeleteEvent(const char* name, void* object) { 1074 void Logger::DeleteEvent(const char* name, void* object) {
1075 if (!log_->IsEnabled() || !FLAG_log) return; 1075 if (!log_->IsEnabled() || !FLAG_log) return;
1076 Log::MessageBuilder msg(log_); 1076 Log::MessageBuilder msg(log_);
1077 msg.Append("delete,%s,0x%" V8PRIxPTR, name, object); 1077 msg.Append("delete,%s,0x%" V8PRIxPTR, name, object);
1078 msg.WriteToLogFile(); 1078 msg.WriteToLogFile();
1079 } 1079 }
1080 1080
1081 1081
1082 void Logger::NewEventStatic(const char* name, void* object, size_t size) {
1083 Isolate::Current()->logger()->NewEvent(name, object, size);
1084 }
1085
1086
1087 void Logger::DeleteEventStatic(const char* name, void* object) {
1088 Isolate::Current()->logger()->DeleteEvent(name, object);
1089 }
1090
1091
1092 void Logger::CallbackEventInternal(const char* prefix, Name* name, 1082 void Logger::CallbackEventInternal(const char* prefix, Name* name,
1093 Address entry_point) { 1083 Address entry_point) {
1094 if (!FLAG_log_code || !log_->IsEnabled()) return; 1084 if (!FLAG_log_code || !log_->IsEnabled()) return;
1095 Log::MessageBuilder msg(log_); 1085 Log::MessageBuilder msg(log_);
1096 msg.Append("%s,%s,-2,", 1086 msg.Append("%s,%s,-2,",
1097 kLogEventsNames[CODE_CREATION_EVENT], 1087 kLogEventsNames[CODE_CREATION_EVENT],
1098 kLogEventsNames[CALLBACK_TAG]); 1088 kLogEventsNames[CALLBACK_TAG]);
1099 msg.AppendAddress(entry_point); 1089 msg.AppendAddress(entry_point);
1100 if (name->IsString()) { 1090 if (name->IsString()) {
1101 SmartArrayPointer<char> str = 1091 SmartArrayPointer<char> str =
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
1915 if (jit_logger_) { 1905 if (jit_logger_) {
1916 removeCodeEventListener(jit_logger_); 1906 removeCodeEventListener(jit_logger_);
1917 delete jit_logger_; 1907 delete jit_logger_;
1918 jit_logger_ = NULL; 1908 jit_logger_ = NULL;
1919 } 1909 }
1920 1910
1921 return log_->Close(); 1911 return log_->Close();
1922 } 1912 }
1923 1913
1924 } } // namespace v8::internal 1914 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/log.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698