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

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: 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 7217 matching lines...) Expand 10 before | Expand all | Expand 10 after
7228 return ToApiHandle<String>(isolate->factory()->InternalizeUtf8String( 7228 return ToApiHandle<String>(isolate->factory()->InternalizeUtf8String(
7229 node->entry()->resource_name())); 7229 node->entry()->resource_name()));
7230 } 7230 }
7231 7231
7232 7232
7233 int CpuProfileNode::GetLineNumber() const { 7233 int CpuProfileNode::GetLineNumber() const {
7234 return reinterpret_cast<const i::ProfileNode*>(this)->entry()->line_number(); 7234 return reinterpret_cast<const i::ProfileNode*>(this)->entry()->line_number();
7235 } 7235 }
7236 7236
7237 7237
7238 Handle<String> CpuProfileNode::GetBailoutReason() const {
7239 i::Isolate* isolate = i::Isolate::Current();
7240 IsDeadCheck(isolate, "v8::CpuProfileNode::GetBailoutReason");
7241 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
7242 return ToApiHandle<String>(isolate->factory()->InternalizeUtf8String(
7243 node->entry()->bailout_reason()));
7244 }
7245
7246
7238 double CpuProfileNode::GetSelfSamplesCount() const { 7247 double CpuProfileNode::GetSelfSamplesCount() const {
7239 i::Isolate* isolate = i::Isolate::Current(); 7248 i::Isolate* isolate = i::Isolate::Current();
7240 IsDeadCheck(isolate, "v8::CpuProfileNode::GetSelfSamplesCount"); 7249 IsDeadCheck(isolate, "v8::CpuProfileNode::GetSelfSamplesCount");
7241 return reinterpret_cast<const i::ProfileNode*>(this)->self_ticks(); 7250 return reinterpret_cast<const i::ProfileNode*>(this)->self_ticks();
7242 } 7251 }
7243 7252
7244 7253
7245 unsigned CpuProfileNode::GetHitCount() const { 7254 unsigned CpuProfileNode::GetHitCount() const {
7246 return reinterpret_cast<const i::ProfileNode*>(this)->self_ticks(); 7255 return reinterpret_cast<const i::ProfileNode*>(this)->self_ticks();
7247 } 7256 }
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
7864 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7873 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7865 Address callback_address = 7874 Address callback_address =
7866 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7875 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7867 VMState<EXTERNAL> state(isolate); 7876 VMState<EXTERNAL> state(isolate);
7868 ExternalCallbackScope call_scope(isolate, callback_address); 7877 ExternalCallbackScope call_scope(isolate, callback_address);
7869 return callback(info); 7878 return callback(info);
7870 } 7879 }
7871 7880
7872 7881
7873 } } // namespace v8::internal 7882 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698