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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 /** | 411 /** |
412 * Takes a heap snapshot and returns it. Title may be an empty string. | 412 * Takes a heap snapshot and returns it. Title may be an empty string. |
413 * See HeapSnapshot::Type for types description. | 413 * See HeapSnapshot::Type for types description. |
414 */ | 414 */ |
415 static const HeapSnapshot* TakeSnapshot( | 415 static const HeapSnapshot* TakeSnapshot( |
416 Handle<String> title, | 416 Handle<String> title, |
417 HeapSnapshot::Type type = HeapSnapshot::kFull, | 417 HeapSnapshot::Type type = HeapSnapshot::kFull, |
418 ActivityControl* control = NULL); | 418 ActivityControl* control = NULL); |
419 | 419 |
420 /** | 420 /** |
| 421 * Starts tracking of heap objects population statistics. After calling |
| 422 * this method, all heap objects relocations done by the garbage collector |
| 423 * are being registered. |
| 424 */ |
| 425 static void StartHeapObjectsTracking(); |
| 426 |
| 427 /** |
| 428 * Adds a new time interval entry to the aggregated statistics array. The |
| 429 * time interval entry contains information on the current heap objects |
| 430 * population size. The method also updates aggregated statistics and |
| 431 * reports updates for all previous time intervals via the OutputStream |
| 432 * object. Updates on each time interval are provided as pairs of time |
| 433 * interval index and updated heap objects count. |
| 434 * |
| 435 * StartHeapObjectsTracking must be called before the first call to this |
| 436 * method. |
| 437 */ |
| 438 static void PushHeapObjectsStats(OutputStream* stream); |
| 439 |
| 440 /** |
| 441 * Stops tracking of heap objects population statistics, cleans up all |
| 442 * collected data. StartHeapObjectsTracking must be called again prior to |
| 443 * calling PushHeapObjectsStats next time. |
| 444 */ |
| 445 static void StopHeapObjectsTracking(); |
| 446 |
| 447 /** |
421 * Deletes all snapshots taken. All previously returned pointers to | 448 * Deletes all snapshots taken. All previously returned pointers to |
422 * snapshots and their contents become invalid after this call. | 449 * snapshots and their contents become invalid after this call. |
423 */ | 450 */ |
424 static void DeleteAllSnapshots(); | 451 static void DeleteAllSnapshots(); |
425 | 452 |
426 /** Binds a callback to embedder's class ID. */ | 453 /** Binds a callback to embedder's class ID. */ |
427 static void DefineWrapperClass( | 454 static void DefineWrapperClass( |
428 uint16_t class_id, | 455 uint16_t class_id, |
429 WrapperInfoCallback callback); | 456 WrapperInfoCallback callback); |
430 | 457 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 }; | 541 }; |
515 | 542 |
516 | 543 |
517 } // namespace v8 | 544 } // namespace v8 |
518 | 545 |
519 | 546 |
520 #undef V8EXPORT | 547 #undef V8EXPORT |
521 | 548 |
522 | 549 |
523 #endif // V8_V8_PROFILER_H_ | 550 #endif // V8_V8_PROFILER_H_ |
OLD | NEW |