| OLD | NEW |
| 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 * other contexts, filtering by security token is performed while | 174 * other contexts, filtering by security token is performed while |
| 175 * obtaining profiling results. | 175 * obtaining profiling results. |
| 176 */ | 176 */ |
| 177 | 177 |
| 178 /** | 178 /** |
| 179 * Returns the number of profiles collected (doesn't include | 179 * Returns the number of profiles collected (doesn't include |
| 180 * profiles that are being collected at the moment of call.) | 180 * profiles that are being collected at the moment of call.) |
| 181 */ | 181 */ |
| 182 int GetProfileCount(); | 182 int GetProfileCount(); |
| 183 | 183 |
| 184 /** Deprecated. Use GetCpuProfile with single parameter. */ | |
| 185 V8_DEPRECATED(const CpuProfile* GetCpuProfile( | |
| 186 int index, | |
| 187 Handle<Value> security_token)); | |
| 188 /** Returns a profile by index. */ | 184 /** Returns a profile by index. */ |
| 189 const CpuProfile* GetCpuProfile(int index); | 185 const CpuProfile* GetCpuProfile(int index); |
| 190 | 186 |
| 191 /** Returns a profile by uid. */ | |
| 192 V8_DEPRECATED(const CpuProfile* FindCpuProfile( | |
| 193 unsigned uid, | |
| 194 Handle<Value> security_token = Handle<Value>())); | |
| 195 | |
| 196 /** | 187 /** |
| 197 * Starts collecting CPU profile. Title may be an empty string. It | 188 * Starts collecting CPU profile. Title may be an empty string. It |
| 198 * is allowed to have several profiles being collected at | 189 * is allowed to have several profiles being collected at |
| 199 * once. Attempts to start collecting several profiles with the same | 190 * once. Attempts to start collecting several profiles with the same |
| 200 * title are silently ignored. While collecting a profile, functions | 191 * title are silently ignored. While collecting a profile, functions |
| 201 * from all security contexts are included in it. The token-based | 192 * from all security contexts are included in it. The token-based |
| 202 * filtering is only performed when querying for a profile. | 193 * filtering is only performed when querying for a profile. |
| 203 * | 194 * |
| 204 * |record_samples| parameter controls whether individual samples should | 195 * |record_samples| parameter controls whether individual samples should |
| 205 * be recorded in addition to the aggregated tree. | 196 * be recorded in addition to the aggregated tree. |
| 206 */ | 197 */ |
| 207 void StartCpuProfiling(Handle<String> title, bool record_samples = false); | 198 void StartCpuProfiling(Handle<String> title, bool record_samples = false); |
| 208 | 199 |
| 209 /** | 200 /** |
| 210 * Deprecated. Use StopCpuProfiling with one parameter instead. | |
| 211 */ | |
| 212 V8_DEPRECATED(const CpuProfile* StopCpuProfiling( | |
| 213 Handle<String> title, | |
| 214 Handle<Value> security_token)); | |
| 215 /** | |
| 216 * Stops collecting CPU profile with a given title and returns it. | 201 * Stops collecting CPU profile with a given title and returns it. |
| 217 * If the title given is empty, finishes the last profile started. | 202 * If the title given is empty, finishes the last profile started. |
| 218 */ | 203 */ |
| 219 const CpuProfile* StopCpuProfiling(Handle<String> title); | 204 const CpuProfile* StopCpuProfiling(Handle<String> title); |
| 220 | 205 |
| 221 /** | 206 /** |
| 222 * Deletes all existing profiles, also cancelling all profiling | 207 * Deletes all existing profiles, also cancelling all profiling |
| 223 * activity. All previously returned pointers to profiles and their | 208 * activity. All previously returned pointers to profiles and their |
| 224 * contents become invalid after this call. | 209 * contents become invalid after this call. |
| 225 */ | 210 */ |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 }; | 584 }; |
| 600 | 585 |
| 601 | 586 |
| 602 } // namespace v8 | 587 } // namespace v8 |
| 603 | 588 |
| 604 | 589 |
| 605 #undef V8EXPORT | 590 #undef V8EXPORT |
| 606 | 591 |
| 607 | 592 |
| 608 #endif // V8_V8_PROFILER_H_ | 593 #endif // V8_V8_PROFILER_H_ |
| OLD | NEW |