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

Side by Side Diff: src/api.cc

Issue 22634010: Merged r16039, r16067 into trunk branch. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
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 7549 matching lines...) Expand 10 before | Expand all | Expand 10 after
7560 return reinterpret_cast<const CpuProfileNode*>(profile->top_down()->root()); 7560 return reinterpret_cast<const CpuProfileNode*>(profile->top_down()->root());
7561 } 7561 }
7562 7562
7563 7563
7564 const CpuProfileNode* CpuProfile::GetSample(int index) const { 7564 const CpuProfileNode* CpuProfile::GetSample(int index) const {
7565 const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this); 7565 const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this);
7566 return reinterpret_cast<const CpuProfileNode*>(profile->sample(index)); 7566 return reinterpret_cast<const CpuProfileNode*>(profile->sample(index));
7567 } 7567 }
7568 7568
7569 7569
7570 int64_t CpuProfile::GetStartTime() const {
7571 const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this);
7572 return profile->start_time_us();
7573 }
7574
7575
7576 int64_t CpuProfile::GetEndTime() const {
7577 const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this);
7578 return profile->end_time_us();
7579 }
7580
7581
7570 int CpuProfile::GetSamplesCount() const { 7582 int CpuProfile::GetSamplesCount() const {
7571 return reinterpret_cast<const i::CpuProfile*>(this)->samples_count(); 7583 return reinterpret_cast<const i::CpuProfile*>(this)->samples_count();
7572 } 7584 }
7573 7585
7574 7586
7575 int CpuProfiler::GetProfileCount() { 7587 int CpuProfiler::GetProfileCount() {
7576 return reinterpret_cast<i::CpuProfiler*>(this)->GetProfilesCount(); 7588 return reinterpret_cast<i::CpuProfiler*>(this)->GetProfilesCount();
7577 } 7589 }
7578 7590
7579 7591
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
8124 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 8136 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
8125 Address callback_address = 8137 Address callback_address =
8126 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8138 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8127 VMState<EXTERNAL> state(isolate); 8139 VMState<EXTERNAL> state(isolate);
8128 ExternalCallbackScope call_scope(isolate, callback_address); 8140 ExternalCallbackScope call_scope(isolate, callback_address);
8129 return callback(info); 8141 return callback(info);
8130 } 8142 }
8131 8143
8132 8144
8133 } } // namespace v8::internal 8145 } } // 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