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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
439 * this method, all heap objects relocations done by the garbage collector | 439 * this method, all heap objects relocations done by the garbage collector |
440 * are being registered. | 440 * are being registered. |
441 */ | 441 */ |
442 static void StartHeapObjectsTracking(); | 442 static void StartHeapObjectsTracking(); |
443 | 443 |
444 /** | 444 /** |
445 * Adds a new time interval entry to the aggregated statistics array. The | 445 * Adds a new time interval entry to the aggregated statistics array. The |
446 * time interval entry contains information on the current heap objects | 446 * time interval entry contains information on the current heap objects |
447 * population size. The method also updates aggregated statistics and | 447 * population size. The method also updates aggregated statistics and |
448 * reports updates for all previous time intervals via the OutputStream | 448 * reports updates for all previous time intervals via the OutputStream |
449 * object. Updates on each time interval are provided as a triplet. It has | 449 * object. Updates on each time interval are provided as a triplet. It has |
mnaganov (inactive)
2012/04/17 13:05:15
"as a triplet. It has ..." -> "as a stream of the
| |
450 * time interval index, updated heap objects count and updated heap objects | 450 * time interval index, updated heap objects count and updated heap objects |
451 * size. | 451 * size. |
452 * | 452 * |
453 * StartHeapObjectsTracking must be called before the first call to this | 453 * StartHeapObjectsTracking must be called before the first call to this |
454 * method. | 454 * method. |
455 */ | 455 */ |
456 static void PushHeapObjectsStats(OutputStream* stream); | 456 static void PushHeapObjectsStats(OutputStream* stream); |
457 | 457 |
458 /** | 458 /** |
459 * Stops tracking of heap objects population statistics, cleans up all | 459 * Stops tracking of heap objects population statistics, cleans up all |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
552 protected: | 552 protected: |
553 RetainedObjectInfo() {} | 553 RetainedObjectInfo() {} |
554 virtual ~RetainedObjectInfo() {} | 554 virtual ~RetainedObjectInfo() {} |
555 | 555 |
556 private: | 556 private: |
557 RetainedObjectInfo(const RetainedObjectInfo&); | 557 RetainedObjectInfo(const RetainedObjectInfo&); |
558 RetainedObjectInfo& operator=(const RetainedObjectInfo&); | 558 RetainedObjectInfo& operator=(const RetainedObjectInfo&); |
559 }; | 559 }; |
560 | 560 |
561 | 561 |
562 /** | |
563 * A struct for exporting HeapStats data from V8, using "push" model. | |
mnaganov (inactive)
2012/04/17 13:05:15
Add "See HeapProfiler::PushHeapObjectsStats."
| |
564 */ | |
565 struct HeapStatsUpdate { | |
566 HeapStatsUpdate(uint32_t index, uint32_t count, uint32_t size) | |
567 : index(index), count(count), size(size) { } | |
568 uint32_t index; | |
yurys
2012/04/17 12:39:54
Please comment on the fields.
| |
569 uint32_t count; | |
570 uint32_t size; | |
571 }; | |
572 | |
573 | |
562 } // namespace v8 | 574 } // namespace v8 |
563 | 575 |
564 | 576 |
565 #undef V8EXPORT | 577 #undef V8EXPORT |
566 | 578 |
567 | 579 |
568 #endif // V8_V8_PROFILER_H_ | 580 #endif // V8_V8_PROFILER_H_ |
OLD | NEW |