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

Side by Side Diff: src/api.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
« no previous file with comments | « include/v8-profiler.h ('k') | src/ast.h » ('j') | src/objects.h » ('J')
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 7237 matching lines...) Expand 10 before | Expand all | Expand 10 after
7248 return ToApiHandle<String>(isolate->factory()->InternalizeUtf8String( 7248 return ToApiHandle<String>(isolate->factory()->InternalizeUtf8String(
7249 node->entry()->resource_name())); 7249 node->entry()->resource_name()));
7250 } 7250 }
7251 7251
7252 7252
7253 int CpuProfileNode::GetLineNumber() const { 7253 int CpuProfileNode::GetLineNumber() const {
7254 return reinterpret_cast<const i::ProfileNode*>(this)->entry()->line_number(); 7254 return reinterpret_cast<const i::ProfileNode*>(this)->entry()->line_number();
7255 } 7255 }
7256 7256
7257 7257
7258 const char* CpuProfileNode::GetBailoutReason() const {
7259 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
7260 return node->entry()->bailout_reason();
7261 }
7262
7263
7258 double CpuProfileNode::GetSelfSamplesCount() const { 7264 double CpuProfileNode::GetSelfSamplesCount() const {
7259 i::Isolate* isolate = i::Isolate::Current(); 7265 i::Isolate* isolate = i::Isolate::Current();
7260 IsDeadCheck(isolate, "v8::CpuProfileNode::GetSelfSamplesCount"); 7266 IsDeadCheck(isolate, "v8::CpuProfileNode::GetSelfSamplesCount");
7261 return reinterpret_cast<const i::ProfileNode*>(this)->self_ticks(); 7267 return reinterpret_cast<const i::ProfileNode*>(this)->self_ticks();
7262 } 7268 }
7263 7269
7264 7270
7265 unsigned CpuProfileNode::GetHitCount() const { 7271 unsigned CpuProfileNode::GetHitCount() const {
7266 return reinterpret_cast<const i::ProfileNode*>(this)->self_ticks(); 7272 return reinterpret_cast<const i::ProfileNode*>(this)->self_ticks();
7267 } 7273 }
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
7891 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7897 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7892 Address callback_address = 7898 Address callback_address =
7893 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7899 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7894 VMState<EXTERNAL> state(isolate); 7900 VMState<EXTERNAL> state(isolate);
7895 ExternalCallbackScope call_scope(isolate, callback_address); 7901 ExternalCallbackScope call_scope(isolate, callback_address);
7896 return callback(info); 7902 return callback(info);
7897 } 7903 }
7898 7904
7899 7905
7900 } } // namespace v8::internal 7906 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8-profiler.h ('k') | src/ast.h » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698