OLD | NEW |
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 7534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7545 return ToApiHandle<String>(isolate->factory()->InternalizeUtf8String( | 7545 return ToApiHandle<String>(isolate->factory()->InternalizeUtf8String( |
7546 node->entry()->resource_name())); | 7546 node->entry()->resource_name())); |
7547 } | 7547 } |
7548 | 7548 |
7549 | 7549 |
7550 int CpuProfileNode::GetLineNumber() const { | 7550 int CpuProfileNode::GetLineNumber() const { |
7551 return reinterpret_cast<const i::ProfileNode*>(this)->entry()->line_number(); | 7551 return reinterpret_cast<const i::ProfileNode*>(this)->entry()->line_number(); |
7552 } | 7552 } |
7553 | 7553 |
7554 | 7554 |
7555 double CpuProfileNode::GetTotalTime() const { | |
7556 i::Isolate* isolate = i::Isolate::Current(); | |
7557 IsDeadCheck(isolate, "v8::CpuProfileNode::GetTotalTime"); | |
7558 return reinterpret_cast<const i::ProfileNode*>(this)->GetTotalMillis(); | |
7559 } | |
7560 | |
7561 | |
7562 double CpuProfileNode::GetSelfTime() const { | |
7563 i::Isolate* isolate = i::Isolate::Current(); | |
7564 IsDeadCheck(isolate, "v8::CpuProfileNode::GetSelfTime"); | |
7565 return reinterpret_cast<const i::ProfileNode*>(this)->GetSelfMillis(); | |
7566 } | |
7567 | |
7568 | |
7569 double CpuProfileNode::GetTotalSamplesCount() const { | |
7570 i::Isolate* isolate = i::Isolate::Current(); | |
7571 IsDeadCheck(isolate, "v8::CpuProfileNode::GetTotalSamplesCount"); | |
7572 return reinterpret_cast<const i::ProfileNode*>(this)->total_ticks(); | |
7573 } | |
7574 | |
7575 | |
7576 double CpuProfileNode::GetSelfSamplesCount() const { | 7555 double CpuProfileNode::GetSelfSamplesCount() const { |
7577 i::Isolate* isolate = i::Isolate::Current(); | 7556 i::Isolate* isolate = i::Isolate::Current(); |
7578 IsDeadCheck(isolate, "v8::CpuProfileNode::GetSelfSamplesCount"); | 7557 IsDeadCheck(isolate, "v8::CpuProfileNode::GetSelfSamplesCount"); |
7579 return reinterpret_cast<const i::ProfileNode*>(this)->self_ticks(); | 7558 return reinterpret_cast<const i::ProfileNode*>(this)->self_ticks(); |
7580 } | 7559 } |
7581 | 7560 |
7582 | 7561 |
7583 unsigned CpuProfileNode::GetHitCount() const { | 7562 unsigned CpuProfileNode::GetHitCount() const { |
7584 return reinterpret_cast<const i::ProfileNode*>(this)->self_ticks(); | 7563 return reinterpret_cast<const i::ProfileNode*>(this)->self_ticks(); |
7585 } | 7564 } |
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8228 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 8207 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
8229 Address callback_address = | 8208 Address callback_address = |
8230 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8209 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
8231 VMState<EXTERNAL> state(isolate); | 8210 VMState<EXTERNAL> state(isolate); |
8232 ExternalCallbackScope call_scope(isolate, callback_address); | 8211 ExternalCallbackScope call_scope(isolate, callback_address); |
8233 return callback(info); | 8212 return callback(info); |
8234 } | 8213 } |
8235 | 8214 |
8236 | 8215 |
8237 } } // namespace v8::internal | 8216 } } // namespace v8::internal |
OLD | NEW |