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

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: update bailout reason in profiler when we get DisableOptimization call" 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/ast.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 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 const char* CpuProfileNode::GetBailoutReason() const {
7239 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
7240 return node->entry()->bailout_reason();
7241 }
7242
7243
7238 double CpuProfileNode::GetSelfSamplesCount() const { 7244 double CpuProfileNode::GetSelfSamplesCount() const {
7239 i::Isolate* isolate = i::Isolate::Current(); 7245 i::Isolate* isolate = i::Isolate::Current();
7240 IsDeadCheck(isolate, "v8::CpuProfileNode::GetSelfSamplesCount"); 7246 IsDeadCheck(isolate, "v8::CpuProfileNode::GetSelfSamplesCount");
7241 return reinterpret_cast<const i::ProfileNode*>(this)->self_ticks(); 7247 return reinterpret_cast<const i::ProfileNode*>(this)->self_ticks();
7242 } 7248 }
7243 7249
7244 7250
7245 unsigned CpuProfileNode::GetHitCount() const { 7251 unsigned CpuProfileNode::GetHitCount() const {
7246 return reinterpret_cast<const i::ProfileNode*>(this)->self_ticks(); 7252 return reinterpret_cast<const i::ProfileNode*>(this)->self_ticks();
7247 } 7253 }
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
7864 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7870 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7865 Address callback_address = 7871 Address callback_address =
7866 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7872 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7867 VMState<EXTERNAL> state(isolate); 7873 VMState<EXTERNAL> state(isolate);
7868 ExternalCallbackScope call_scope(isolate, callback_address); 7874 ExternalCallbackScope call_scope(isolate, callback_address);
7869 return callback(info); 7875 return callback(info);
7870 } 7876 }
7871 7877
7872 7878
7873 } } // namespace v8::internal 7879 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8-profiler.h ('k') | src/ast.h » ('j') | src/ast.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698