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 * This method gives us an update of the heap state. | |
mnaganov (inactive)
2012/04/12 13:32:26
Comments look a bit weird. How about putting Start
| |
422 * It appends a new time interval to an aggegated stats array, | |
423 * traverse the heap and: assign ids to new objects, remove ids of collected | |
424 * objects, count of alive objects for the each time interval and if the stats | |
425 * for a time interval were changed, report the new stats to the caller via | |
426 * OutputStream object. | |
427 */ | |
428 static void PushHeapObjectsStats(OutputStream* stream); | |
mnaganov (inactive)
2012/04/12 13:32:26
nit: add a blank line before the comment
| |
429 /** | |
430 * At GC phase objects can be moved and we want to track these movements. | |
431 * in the other case we will count moved objects as new. | |
432 */ | |
433 static void StartHeapObjectsTracking(); | |
mnaganov (inactive)
2012/04/12 13:32:26
nit: add a blank line before the comment
| |
434 /** | |
435 * Stop objects movements tracking and clean the list of time intervals. | |
436 */ | |
437 static void StopHeapObjectsTracking(); | |
438 | |
439 /** | |
421 * Deletes all snapshots taken. All previously returned pointers to | 440 * Deletes all snapshots taken. All previously returned pointers to |
422 * snapshots and their contents become invalid after this call. | 441 * snapshots and their contents become invalid after this call. |
423 */ | 442 */ |
424 static void DeleteAllSnapshots(); | 443 static void DeleteAllSnapshots(); |
425 | 444 |
426 /** Binds a callback to embedder's class ID. */ | 445 /** Binds a callback to embedder's class ID. */ |
427 static void DefineWrapperClass( | 446 static void DefineWrapperClass( |
428 uint16_t class_id, | 447 uint16_t class_id, |
429 WrapperInfoCallback callback); | 448 WrapperInfoCallback callback); |
430 | 449 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
514 }; | 533 }; |
515 | 534 |
516 | 535 |
517 } // namespace v8 | 536 } // namespace v8 |
518 | 537 |
519 | 538 |
520 #undef V8EXPORT | 539 #undef V8EXPORT |
521 | 540 |
522 | 541 |
523 #endif // V8_V8_PROFILER_H_ | 542 #endif // V8_V8_PROFILER_H_ |
OLD | NEW |