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 7573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7584 return reinterpret_cast<const CpuProfileNode*>(profile->top_down()->root()); | 7584 return reinterpret_cast<const CpuProfileNode*>(profile->top_down()->root()); |
7585 } | 7585 } |
7586 | 7586 |
7587 | 7587 |
7588 const CpuProfileNode* CpuProfile::GetSample(int index) const { | 7588 const CpuProfileNode* CpuProfile::GetSample(int index) const { |
7589 const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this); | 7589 const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this); |
7590 return reinterpret_cast<const CpuProfileNode*>(profile->sample(index)); | 7590 return reinterpret_cast<const CpuProfileNode*>(profile->sample(index)); |
7591 } | 7591 } |
7592 | 7592 |
7593 | 7593 |
7594 int64_t CpuProfile::GetStartTime() const { | 7594 double CpuProfile::GetStartTime() const { |
7595 const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this); | 7595 const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this); |
7596 return profile->start_time_us(); | 7596 return profile->start_time_ms(); |
7597 } | 7597 } |
7598 | 7598 |
7599 | 7599 |
7600 int64_t CpuProfile::GetEndTime() const { | 7600 double CpuProfile::GetEndTime() const { |
7601 const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this); | 7601 const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this); |
7602 return profile->end_time_us(); | 7602 return profile->end_time_ms(); |
7603 } | 7603 } |
7604 | 7604 |
7605 | 7605 |
7606 int CpuProfile::GetSamplesCount() const { | 7606 int CpuProfile::GetSamplesCount() const { |
7607 return reinterpret_cast<const i::CpuProfile*>(this)->samples_count(); | 7607 return reinterpret_cast<const i::CpuProfile*>(this)->samples_count(); |
7608 } | 7608 } |
7609 | 7609 |
7610 | 7610 |
7611 int CpuProfiler::GetProfileCount() { | 7611 int CpuProfiler::GetProfileCount() { |
7612 return reinterpret_cast<i::CpuProfiler*>(this)->GetProfilesCount(); | 7612 return reinterpret_cast<i::CpuProfiler*>(this)->GetProfilesCount(); |
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8160 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 8160 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
8161 Address callback_address = | 8161 Address callback_address = |
8162 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8162 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
8163 VMState<EXTERNAL> state(isolate); | 8163 VMState<EXTERNAL> state(isolate); |
8164 ExternalCallbackScope call_scope(isolate, callback_address); | 8164 ExternalCallbackScope call_scope(isolate, callback_address); |
8165 return callback(info); | 8165 return callback(info); |
8166 } | 8166 } |
8167 | 8167 |
8168 | 8168 |
8169 } } // namespace v8::internal | 8169 } } // namespace v8::internal |
OLD | NEW |