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

Side by Side Diff: src/api.cc

Issue 22189002: Revert "Return start/end profiling time in microseconds instead of milliseconds" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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/profile-generator.h » ('j') | no next file with comments »
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 7573 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « include/v8-profiler.h ('k') | src/profile-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698