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

Side by Side Diff: src/cpu-profiler.cc

Issue 23817003: Propagate bailout and dont_optimize reasons to cpu-profiler (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: comments addressed Created 7 years, 3 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
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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; 236 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_;
237 rec->start = code->address(); 237 rec->start = code->address();
238 rec->entry = profiles_->NewCodeEntry(tag, profiles_->GetFunctionName(name)); 238 rec->entry = profiles_->NewCodeEntry(tag, profiles_->GetFunctionName(name));
239 if (info) { 239 if (info) {
240 rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges()); 240 rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges());
241 } 241 }
242 if (shared->script()->IsScript()) { 242 if (shared->script()->IsScript()) {
243 ASSERT(Script::cast(shared->script())); 243 ASSERT(Script::cast(shared->script()));
244 Script* script = Script::cast(shared->script()); 244 Script* script = Script::cast(shared->script());
245 rec->entry->set_script_id(script->id()->value()); 245 rec->entry->set_script_id(script->id()->value());
246 rec->entry->set_bailout_reason(
247 GetBailoutReason(shared->DisableOptimizationReason()));
246 } 248 }
247 rec->size = code->ExecutableSize(); 249 rec->size = code->ExecutableSize();
248 rec->shared = shared->address(); 250 rec->shared = shared->address();
249 processor_->Enqueue(evt_rec); 251 processor_->Enqueue(evt_rec);
250 } 252 }
251 253
252 254
253 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, 255 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag,
254 Code* code, 256 Code* code,
255 SharedFunctionInfo* shared, 257 SharedFunctionInfo* shared,
(...skipping 10 matching lines...) Expand all
266 profiles_->GetName(source), 268 profiles_->GetName(source),
267 line); 269 line);
268 if (info) { 270 if (info) {
269 rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges()); 271 rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges());
270 } 272 }
271 ASSERT(Script::cast(shared->script())); 273 ASSERT(Script::cast(shared->script()));
272 Script* script = Script::cast(shared->script()); 274 Script* script = Script::cast(shared->script());
273 rec->entry->set_script_id(script->id()->value()); 275 rec->entry->set_script_id(script->id()->value());
274 rec->size = code->ExecutableSize(); 276 rec->size = code->ExecutableSize();
275 rec->shared = shared->address(); 277 rec->shared = shared->address();
278 rec->entry->set_bailout_reason(
279 GetBailoutReason(shared->DisableOptimizationReason()));
276 processor_->Enqueue(evt_rec); 280 processor_->Enqueue(evt_rec);
277 } 281 }
278 282
279 283
280 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, 284 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag,
281 Code* code, 285 Code* code,
282 int args_count) { 286 int args_count) {
283 if (FilterOutCodeCreateEvent(tag)) return; 287 if (FilterOutCodeCreateEvent(tag)) return;
284 CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION); 288 CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION);
285 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; 289 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_;
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_; 497 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_;
494 Builtins::Name id = static_cast<Builtins::Name>(i); 498 Builtins::Name id = static_cast<Builtins::Name>(i);
495 rec->start = builtins->builtin(id)->address(); 499 rec->start = builtins->builtin(id)->address();
496 rec->builtin_id = id; 500 rec->builtin_id = id;
497 processor_->Enqueue(evt_rec); 501 processor_->Enqueue(evt_rec);
498 } 502 }
499 } 503 }
500 504
501 505
502 } } // namespace v8::internal 506 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/full-codegen.cc » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698