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

Side by Side Diff: src/api.cc

Issue 21593002: Propagate bailout reason to cpu profile node. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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 | « include/v8-profiler.h ('k') | src/cpu-profiler.cc » ('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 7444 matching lines...) Expand 10 before | Expand all | Expand 10 after
7455 } 7455 }
7456 7456
7457 7457
7458 int CpuProfileNode::GetLineNumber() const { 7458 int CpuProfileNode::GetLineNumber() const {
7459 i::Isolate* isolate = i::Isolate::Current(); 7459 i::Isolate* isolate = i::Isolate::Current();
7460 IsDeadCheck(isolate, "v8::CpuProfileNode::GetLineNumber"); 7460 IsDeadCheck(isolate, "v8::CpuProfileNode::GetLineNumber");
7461 return reinterpret_cast<const i::ProfileNode*>(this)->entry()->line_number(); 7461 return reinterpret_cast<const i::ProfileNode*>(this)->entry()->line_number();
7462 } 7462 }
7463 7463
7464 7464
7465 Handle<String> CpuProfileNode::GetBailoutReason() const {
7466 i::Isolate* isolate = i::Isolate::Current();
7467 IsDeadCheck(isolate, "v8::CpuProfileNode::GetBailoutReason");
7468 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
7469 return ToApiHandle<String>(isolate->factory()->InternalizeUtf8String(
7470 node->entry()->bailout_reason()));
7471 }
7472
7465 double CpuProfileNode::GetTotalTime() const { 7473 double CpuProfileNode::GetTotalTime() const {
7466 i::Isolate* isolate = i::Isolate::Current(); 7474 i::Isolate* isolate = i::Isolate::Current();
7467 IsDeadCheck(isolate, "v8::CpuProfileNode::GetTotalTime"); 7475 IsDeadCheck(isolate, "v8::CpuProfileNode::GetTotalTime");
7468 return reinterpret_cast<const i::ProfileNode*>(this)->GetTotalMillis(); 7476 return reinterpret_cast<const i::ProfileNode*>(this)->GetTotalMillis();
7469 } 7477 }
7470 7478
7471 7479
7472 double CpuProfileNode::GetSelfTime() const { 7480 double CpuProfileNode::GetSelfTime() const {
7473 i::Isolate* isolate = i::Isolate::Current(); 7481 i::Isolate* isolate = i::Isolate::Current();
7474 IsDeadCheck(isolate, "v8::CpuProfileNode::GetSelfTime"); 7482 IsDeadCheck(isolate, "v8::CpuProfileNode::GetSelfTime");
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
8118 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 8126 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
8119 Address callback_address = 8127 Address callback_address =
8120 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8128 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8121 VMState<EXTERNAL> state(isolate); 8129 VMState<EXTERNAL> state(isolate);
8122 ExternalCallbackScope call_scope(isolate, callback_address); 8130 ExternalCallbackScope call_scope(isolate, callback_address);
8123 return callback(info); 8131 return callback(info);
8124 } 8132 }
8125 8133
8126 8134
8127 } } // namespace v8::internal 8135 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8-profiler.h ('k') | src/cpu-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698