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

Side by Side Diff: src/cpu-profiler.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/cpu-profiler.h ('k') | src/log.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 rec->size = code->ExecutableSize(); 253 rec->size = code->ExecutableSize();
254 rec->shared = shared->address(); 254 rec->shared = shared->address();
255 processor_->Enqueue(evt_rec); 255 processor_->Enqueue(evt_rec);
256 } 256 }
257 257
258 258
259 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, 259 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag,
260 Code* code, 260 Code* code,
261 SharedFunctionInfo* shared, 261 SharedFunctionInfo* shared,
262 CompilationInfo* info, 262 CompilationInfo* info,
263 Name* source, int line) { 263 Name* source, int line, int column) {
264 if (FilterOutCodeCreateEvent(tag)) return; 264 if (FilterOutCodeCreateEvent(tag)) return;
265 CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION); 265 CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION);
266 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; 266 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_;
267 rec->start = code->address(); 267 rec->start = code->address();
268 rec->entry = profiles_->NewCodeEntry( 268 rec->entry = profiles_->NewCodeEntry(
269 tag, 269 tag,
270 profiles_->GetFunctionName(shared->DebugName()), 270 profiles_->GetFunctionName(shared->DebugName()),
271 CodeEntry::kEmptyNamePrefix, 271 CodeEntry::kEmptyNamePrefix,
272 profiles_->GetName(source), 272 profiles_->GetName(source),
273 line); 273 line,
274 column);
274 if (info) { 275 if (info) {
275 rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges()); 276 rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges());
276 } 277 }
277 ASSERT(Script::cast(shared->script())); 278 ASSERT(Script::cast(shared->script()));
278 Script* script = Script::cast(shared->script()); 279 Script* script = Script::cast(shared->script());
279 rec->entry->set_script_id(script->id()->value()); 280 rec->entry->set_script_id(script->id()->value());
280 rec->size = code->ExecutableSize(); 281 rec->size = code->ExecutableSize();
281 rec->shared = shared->address(); 282 rec->shared = shared->address();
282 rec->entry->set_bailout_reason( 283 rec->entry->set_bailout_reason(
283 GetBailoutReason(shared->DisableOptimizationReason())); 284 GetBailoutReason(shared->DisableOptimizationReason()));
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_; 512 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_;
512 Builtins::Name id = static_cast<Builtins::Name>(i); 513 Builtins::Name id = static_cast<Builtins::Name>(i);
513 rec->start = builtins->builtin(id)->address(); 514 rec->start = builtins->builtin(id)->address();
514 rec->builtin_id = id; 515 rec->builtin_id = id;
515 processor_->Enqueue(evt_rec); 516 processor_->Enqueue(evt_rec);
516 } 517 }
517 } 518 }
518 519
519 520
520 } } // namespace v8::internal 521 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/cpu-profiler.h ('k') | src/log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698