| 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 7066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7077 | 7077 |
| 7078 | 7078 |
| 7079 const CpuProfileNode* CpuProfile::GetSample(int index) const { | 7079 const CpuProfileNode* CpuProfile::GetSample(int index) const { |
| 7080 const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this); | 7080 const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this); |
| 7081 return reinterpret_cast<const CpuProfileNode*>(profile->sample(index)); | 7081 return reinterpret_cast<const CpuProfileNode*>(profile->sample(index)); |
| 7082 } | 7082 } |
| 7083 | 7083 |
| 7084 | 7084 |
| 7085 int64_t CpuProfile::GetStartTime() const { | 7085 int64_t CpuProfile::GetStartTime() const { |
| 7086 const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this); | 7086 const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this); |
| 7087 return (profile->start_time() - i::Time::UnixEpoch()).InMicroseconds(); | 7087 return (profile->start_time() - i::TimeTicks()).InMicroseconds(); |
| 7088 } | 7088 } |
| 7089 | 7089 |
| 7090 | 7090 |
| 7091 int64_t CpuProfile::GetEndTime() const { | 7091 int64_t CpuProfile::GetEndTime() const { |
| 7092 const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this); | 7092 const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this); |
| 7093 return (profile->end_time() - i::Time::UnixEpoch()).InMicroseconds(); | 7093 return (profile->end_time() - i::TimeTicks()).InMicroseconds(); |
| 7094 } | 7094 } |
| 7095 | 7095 |
| 7096 | 7096 |
| 7097 int CpuProfile::GetSamplesCount() const { | 7097 int CpuProfile::GetSamplesCount() const { |
| 7098 return reinterpret_cast<const i::CpuProfile*>(this)->samples_count(); | 7098 return reinterpret_cast<const i::CpuProfile*>(this)->samples_count(); |
| 7099 } | 7099 } |
| 7100 | 7100 |
| 7101 | 7101 |
| 7102 void CpuProfiler::SetSamplingInterval(int us) { | 7102 void CpuProfiler::SetSamplingInterval(int us) { |
| 7103 ASSERT(us >= 0); | 7103 ASSERT(us >= 0); |
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7613 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7613 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 7614 Address callback_address = | 7614 Address callback_address = |
| 7615 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7615 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 7616 VMState<EXTERNAL> state(isolate); | 7616 VMState<EXTERNAL> state(isolate); |
| 7617 ExternalCallbackScope call_scope(isolate, callback_address); | 7617 ExternalCallbackScope call_scope(isolate, callback_address); |
| 7618 callback(info); | 7618 callback(info); |
| 7619 } | 7619 } |
| 7620 | 7620 |
| 7621 | 7621 |
| 7622 } } // namespace v8::internal | 7622 } } // namespace v8::internal |
| OLD | NEW |