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

Side by Side Diff: include/v8-profiler.h

Issue 259803002: Add timestamps to CPU profile samples. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix race Created 6 years, 7 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 | « no previous file | src/api.cc » ('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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 */ 99 */
100 class V8_EXPORT CpuProfile { 100 class V8_EXPORT CpuProfile {
101 public: 101 public:
102 /** Returns CPU profile title. */ 102 /** Returns CPU profile title. */
103 Handle<String> GetTitle() const; 103 Handle<String> GetTitle() const;
104 104
105 /** Returns the root node of the top down call tree. */ 105 /** Returns the root node of the top down call tree. */
106 const CpuProfileNode* GetTopDownRoot() const; 106 const CpuProfileNode* GetTopDownRoot() const;
107 107
108 /** 108 /**
109 * Returns number of samples recorded. The samples are not recorded unless 109 * Returns number of samples recorded. The samples are not recorded unless
110 * |record_samples| parameter of CpuProfiler::StartCpuProfiling is true. 110 * |record_samples| parameter of CpuProfiler::StartCpuProfiling is true.
111 */ 111 */
112 int GetSamplesCount() const; 112 int GetSamplesCount() const;
113 113
114 /** 114 /**
115 * Returns profile node corresponding to the top frame the sample at 115 * Returns profile node corresponding to the top frame the sample at
116 * the given index. 116 * the given index.
117 */ 117 */
118 const CpuProfileNode* GetSample(int index) const; 118 const CpuProfileNode* GetSample(int index) const;
119 119
120 /** 120 /**
121 * Returns time when the profile recording was started (in microseconds) 121 * Returns the timestamp of the sample. The timestamp is the number of
122 * since some unspecified starting point. 122 * microseconds since some unspecified starting point.
123 */ 123 * The point is equal to the starting point used by GetStartTime.
124 */
125 int64_t GetSampleTimestamp(int index) const;
126
127 /**
128 * Returns time when the profile recording was started (in microseconds)
129 * since some unspecified starting point.
130 */
124 int64_t GetStartTime() const; 131 int64_t GetStartTime() const;
125 132
126 /** 133 /**
127 * Returns time when the profile recording was stopped (in microseconds) 134 * Returns time when the profile recording was stopped (in microseconds)
128 * since some unspecified starting point. The point is however equal to the 135 * since some unspecified starting point.
129 * starting point used by GetStartTime. 136 * The point is equal to the starting point used by GetStartTime.
130 */ 137 */
131 int64_t GetEndTime() const; 138 int64_t GetEndTime() const;
132 139
133 /** 140 /**
134 * Deletes the profile and removes it from CpuProfiler's list. 141 * Deletes the profile and removes it from CpuProfiler's list.
135 * All pointers to nodes previously returned become invalid. 142 * All pointers to nodes previously returned become invalid.
136 */ 143 */
137 void Delete(); 144 void Delete();
138 }; 145 };
139 146
140 147
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 uint32_t index; // Index of the time interval that was changed. 624 uint32_t index; // Index of the time interval that was changed.
618 uint32_t count; // New value of count field for the interval with this index. 625 uint32_t count; // New value of count field for the interval with this index.
619 uint32_t size; // New value of size field for the interval with this index. 626 uint32_t size; // New value of size field for the interval with this index.
620 }; 627 };
621 628
622 629
623 } // namespace v8 630 } // namespace v8
624 631
625 632
626 #endif // V8_V8_PROFILER_H_ 633 #endif // V8_V8_PROFILER_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698