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

Side by Side Diff: src/log.cc

Issue 25541003: Add column getter to CpuProfileNode (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Also check script id in the test Created 7 years, 2 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/log.h ('k') | src/profile-generator.h » ('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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 name_buffer_->AppendBytes(ComputeMarker(code)); 205 name_buffer_->AppendBytes(ComputeMarker(code));
206 name_buffer_->AppendName(name); 206 name_buffer_->AppendName(name);
207 LogRecordedBuffer(code, shared, name_buffer_->get(), name_buffer_->size()); 207 LogRecordedBuffer(code, shared, name_buffer_->get(), name_buffer_->size());
208 } 208 }
209 209
210 210
211 void CodeEventLogger::CodeCreateEvent(Logger::LogEventsAndTags tag, 211 void CodeEventLogger::CodeCreateEvent(Logger::LogEventsAndTags tag,
212 Code* code, 212 Code* code,
213 SharedFunctionInfo* shared, 213 SharedFunctionInfo* shared,
214 CompilationInfo* info, 214 CompilationInfo* info,
215 Name* source, int line) { 215 Name* source, int line, int column) {
216 name_buffer_->Init(tag); 216 name_buffer_->Init(tag);
217 name_buffer_->AppendBytes(ComputeMarker(code)); 217 name_buffer_->AppendBytes(ComputeMarker(code));
218 name_buffer_->AppendString(shared->DebugName()); 218 name_buffer_->AppendString(shared->DebugName());
219 name_buffer_->AppendByte(' '); 219 name_buffer_->AppendByte(' ');
220 if (source->IsString()) { 220 if (source->IsString()) {
221 name_buffer_->AppendString(String::cast(source)); 221 name_buffer_->AppendString(String::cast(source));
222 } else { 222 } else {
223 name_buffer_->AppendBytes("symbol(hash "); 223 name_buffer_->AppendBytes("symbol(hash ");
224 name_buffer_->AppendHex(Name::cast(source)->Hash()); 224 name_buffer_->AppendHex(Name::cast(source)->Hash());
225 name_buffer_->AppendByte(')'); 225 name_buffer_->AppendByte(')');
(...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after
1225 1225
1226 1226
1227 // Although, it is possible to extract source and line from 1227 // Although, it is possible to extract source and line from
1228 // the SharedFunctionInfo object, we left it to caller 1228 // the SharedFunctionInfo object, we left it to caller
1229 // to leave logging functions free from heap allocations. 1229 // to leave logging functions free from heap allocations.
1230 void Logger::CodeCreateEvent(LogEventsAndTags tag, 1230 void Logger::CodeCreateEvent(LogEventsAndTags tag,
1231 Code* code, 1231 Code* code,
1232 SharedFunctionInfo* shared, 1232 SharedFunctionInfo* shared,
1233 CompilationInfo* info, 1233 CompilationInfo* info,
1234 Name* source, int line, int column) { 1234 Name* source, int line, int column) {
1235 PROFILER_LOG(CodeCreateEvent(tag, code, shared, info, source, line)); 1235 PROFILER_LOG(CodeCreateEvent(tag, code, shared, info, source, line, column));
1236 1236
1237 if (!is_logging_code_events()) return; 1237 if (!is_logging_code_events()) return;
1238 CALL_LISTENERS(CodeCreateEvent(tag, code, shared, info, source, line)); 1238 CALL_LISTENERS(CodeCreateEvent(tag, code, shared, info, source, line,
1239 column));
1239 1240
1240 if (!FLAG_log_code || !log_->IsEnabled()) return; 1241 if (!FLAG_log_code || !log_->IsEnabled()) return;
1241 Log::MessageBuilder msg(log_); 1242 Log::MessageBuilder msg(log_);
1242 AppendCodeCreateHeader(&msg, tag, code); 1243 AppendCodeCreateHeader(&msg, tag, code);
1243 SmartArrayPointer<char> name = 1244 SmartArrayPointer<char> name =
1244 shared->DebugName()->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL); 1245 shared->DebugName()->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
1245 msg.Append("\"%s ", *name); 1246 msg.Append("\"%s ", *name);
1246 if (source->IsString()) { 1247 if (source->IsString()) {
1247 SmartArrayPointer<char> sourcestr = 1248 SmartArrayPointer<char> sourcestr =
1248 String::cast(source)->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL); 1249 String::cast(source)->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
1909 if (jit_logger_) { 1910 if (jit_logger_) {
1910 removeCodeEventListener(jit_logger_); 1911 removeCodeEventListener(jit_logger_);
1911 delete jit_logger_; 1912 delete jit_logger_;
1912 jit_logger_ = NULL; 1913 jit_logger_ = NULL;
1913 } 1914 }
1914 1915
1915 return log_->Close(); 1916 return log_->Close();
1916 } 1917 }
1917 1918
1918 } } // namespace v8::internal 1919 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/log.h ('k') | src/profile-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698