| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 /** | 177 /** |
| 178 * Returns the number of profiles collected (doesn't include | 178 * Returns the number of profiles collected (doesn't include |
| 179 * profiles that are being collected at the moment of call.) | 179 * profiles that are being collected at the moment of call.) |
| 180 */ | 180 */ |
| 181 int GetProfileCount(); | 181 int GetProfileCount(); |
| 182 | 182 |
| 183 /** Deprecated. Use GetCpuProfile instead. */ | 183 /** Deprecated. Use GetCpuProfile instead. */ |
| 184 V8_DEPRECATED(static const CpuProfile* GetProfile( | 184 V8_DEPRECATED(static const CpuProfile* GetProfile( |
| 185 int index, | 185 int index, |
| 186 Handle<Value> security_token = Handle<Value>())); | 186 Handle<Value> security_token = Handle<Value>())); |
| 187 /** Deprecated. Use GetCpuProfile with single parameter. */ |
| 188 V8_DEPRECATED(const CpuProfile* GetCpuProfile( |
| 189 int index, |
| 190 Handle<Value> security_token)); |
| 187 /** Returns a profile by index. */ | 191 /** Returns a profile by index. */ |
| 188 const CpuProfile* GetCpuProfile( | 192 const CpuProfile* GetCpuProfile(int index); |
| 189 int index, | |
| 190 Handle<Value> security_token = Handle<Value>()); | |
| 191 | 193 |
| 192 /** Deprecated. Use FindProfile instead. */ | 194 /** Deprecated. Use FindProfile instead. */ |
| 193 V8_DEPRECATED(static const CpuProfile* FindProfile( | 195 V8_DEPRECATED(static const CpuProfile* FindProfile( |
| 194 unsigned uid, | 196 unsigned uid, |
| 195 Handle<Value> security_token = Handle<Value>())); | 197 Handle<Value> security_token = Handle<Value>())); |
| 196 /** Returns a profile by uid. */ | 198 /** Returns a profile by uid. */ |
| 197 const CpuProfile* FindCpuProfile( | 199 V8_DEPRECATED(const CpuProfile* FindCpuProfile( |
| 198 unsigned uid, | 200 unsigned uid, |
| 199 Handle<Value> security_token = Handle<Value>()); | 201 Handle<Value> security_token = Handle<Value>())); |
| 200 | 202 |
| 201 /** Deprecated. Use StartCpuProfiling instead. */ | 203 /** Deprecated. Use StartCpuProfiling instead. */ |
| 202 V8_DEPRECATED(static void StartProfiling(Handle<String> title, | 204 V8_DEPRECATED(static void StartProfiling(Handle<String> title, |
| 203 bool record_samples = false)); | 205 bool record_samples = false)); |
| 204 /** | 206 /** |
| 205 * Starts collecting CPU profile. Title may be an empty string. It | 207 * Starts collecting CPU profile. Title may be an empty string. It |
| 206 * is allowed to have several profiles being collected at | 208 * is allowed to have several profiles being collected at |
| 207 * once. Attempts to start collecting several profiles with the same | 209 * once. Attempts to start collecting several profiles with the same |
| 208 * title are silently ignored. While collecting a profile, functions | 210 * title are silently ignored. While collecting a profile, functions |
| 209 * from all security contexts are included in it. The token-based | 211 * from all security contexts are included in it. The token-based |
| 210 * filtering is only performed when querying for a profile. | 212 * filtering is only performed when querying for a profile. |
| 211 * | 213 * |
| 212 * |record_samples| parameter controls whether individual samples should | 214 * |record_samples| parameter controls whether individual samples should |
| 213 * be recorded in addition to the aggregated tree. | 215 * be recorded in addition to the aggregated tree. |
| 214 */ | 216 */ |
| 215 void StartCpuProfiling(Handle<String> title, bool record_samples = false); | 217 void StartCpuProfiling(Handle<String> title, bool record_samples = false); |
| 216 | 218 |
| 217 /** Deprecated. Use StopCpuProfiling instead. */ | 219 /** Deprecated. Use StopCpuProfiling instead. */ |
| 218 V8_DEPRECATED(static const CpuProfile* StopProfiling( | 220 V8_DEPRECATED(static const CpuProfile* StopProfiling( |
| 219 Handle<String> title, | 221 Handle<String> title, |
| 220 Handle<Value> security_token = Handle<Value>())); | 222 Handle<Value> security_token = Handle<Value>())); |
| 221 /** | 223 /** |
| 224 * Deprecated. Use StopCpuProfiling with one parameter instead. |
| 225 */ |
| 226 V8_DEPRECATED(const CpuProfile* StopCpuProfiling( |
| 227 Handle<String> title, |
| 228 Handle<Value> security_token)); |
| 229 /** |
| 222 * Stops collecting CPU profile with a given title and returns it. | 230 * Stops collecting CPU profile with a given title and returns it. |
| 223 * If the title given is empty, finishes the last profile started. | 231 * If the title given is empty, finishes the last profile started. |
| 224 */ | 232 */ |
| 225 const CpuProfile* StopCpuProfiling( | 233 const CpuProfile* StopCpuProfiling(Handle<String> title); |
| 226 Handle<String> title, | |
| 227 Handle<Value> security_token = Handle<Value>()); | |
| 228 | 234 |
| 229 /** Deprecated. Use DeleteAllCpuProfiles instead. */ | 235 /** Deprecated. Use DeleteAllCpuProfiles instead. */ |
| 230 V8_DEPRECATED(static void DeleteAllProfiles()); | 236 V8_DEPRECATED(static void DeleteAllProfiles()); |
| 231 /** | 237 /** |
| 232 * Deletes all existing profiles, also cancelling all profiling | 238 * Deletes all existing profiles, also cancelling all profiling |
| 233 * activity. All previously returned pointers to profiles and their | 239 * activity. All previously returned pointers to profiles and their |
| 234 * contents become invalid after this call. | 240 * contents become invalid after this call. |
| 235 */ | 241 */ |
| 236 void DeleteAllCpuProfiles(); | 242 void DeleteAllCpuProfiles(); |
| 237 | 243 |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 int GetSnapshotCount(); | 437 int GetSnapshotCount(); |
| 432 | 438 |
| 433 /** Deprecated. Use GetHeapSnapshot instead. */ | 439 /** Deprecated. Use GetHeapSnapshot instead. */ |
| 434 V8_DEPRECATED(static const HeapSnapshot* GetSnapshot(int index)); | 440 V8_DEPRECATED(static const HeapSnapshot* GetSnapshot(int index)); |
| 435 /** Returns a snapshot by index. */ | 441 /** Returns a snapshot by index. */ |
| 436 const HeapSnapshot* GetHeapSnapshot(int index); | 442 const HeapSnapshot* GetHeapSnapshot(int index); |
| 437 | 443 |
| 438 /** Deprecated. Use FindHeapSnapshot instead. */ | 444 /** Deprecated. Use FindHeapSnapshot instead. */ |
| 439 V8_DEPRECATED(static const HeapSnapshot* FindSnapshot(unsigned uid)); | 445 V8_DEPRECATED(static const HeapSnapshot* FindSnapshot(unsigned uid)); |
| 440 /** Returns a profile by uid. */ | 446 /** Returns a profile by uid. */ |
| 441 const HeapSnapshot* FindHeapSnapshot(unsigned uid); | 447 V8_DEPRECATED(const HeapSnapshot* FindHeapSnapshot(unsigned uid)); |
| 442 | 448 |
| 443 /** Deprecated. Use GetObjectId instead. */ | 449 /** Deprecated. Use GetObjectId instead. */ |
| 444 V8_DEPRECATED(static SnapshotObjectId GetSnapshotObjectId( | 450 V8_DEPRECATED(static SnapshotObjectId GetSnapshotObjectId( |
| 445 Handle<Value> value)); | 451 Handle<Value> value)); |
| 446 /** | 452 /** |
| 447 * Returns SnapshotObjectId for a heap object referenced by |value| if | 453 * Returns SnapshotObjectId for a heap object referenced by |value| if |
| 448 * it has been seen by the heap profiler, kUnknownObjectId otherwise. | 454 * it has been seen by the heap profiler, kUnknownObjectId otherwise. |
| 449 */ | 455 */ |
| 450 SnapshotObjectId GetObjectId(Handle<Value> value); | 456 SnapshotObjectId GetObjectId(Handle<Value> value); |
| 451 | 457 |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 }; | 660 }; |
| 655 | 661 |
| 656 | 662 |
| 657 } // namespace v8 | 663 } // namespace v8 |
| 658 | 664 |
| 659 | 665 |
| 660 #undef V8EXPORT | 666 #undef V8EXPORT |
| 661 | 667 |
| 662 | 668 |
| 663 #endif // V8_V8_PROFILER_H_ | 669 #endif // V8_V8_PROFILER_H_ |
| OLD | NEW |