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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 Type type, | 519 Type type, |
520 const char* name, | 520 const char* name, |
521 uint64_t id, | 521 uint64_t id, |
522 int self_size, | 522 int self_size, |
523 int children_count, | 523 int children_count, |
524 int retainers_count); | 524 int retainers_count); |
525 | 525 |
526 HeapSnapshot* snapshot() { return snapshot_; } | 526 HeapSnapshot* snapshot() { return snapshot_; } |
527 Type type() { return static_cast<Type>(type_); } | 527 Type type() { return static_cast<Type>(type_); } |
528 const char* name() { return name_; } | 528 const char* name() { return name_; } |
529 uint64_t id() { return id_; } | 529 uint64_t id(); |
530 int self_size() { return self_size_; } | 530 int self_size() { return self_size_; } |
531 int retained_size() { return retained_size_; } | 531 int retained_size() { return retained_size_; } |
532 void add_retained_size(int size) { retained_size_ += size; } | 532 void add_retained_size(int size) { retained_size_ += size; } |
533 void set_retained_size(int value) { retained_size_ = value; } | 533 void set_retained_size(int value) { retained_size_ = value; } |
534 int ordered_index() { return ordered_index_; } | 534 int ordered_index() { return ordered_index_; } |
535 void set_ordered_index(int value) { ordered_index_ = value; } | 535 void set_ordered_index(int value) { ordered_index_ = value; } |
536 | 536 |
537 Vector<HeapGraphEdge> children() { | 537 Vector<HeapGraphEdge> children() { |
538 return Vector<HeapGraphEdge>(children_arr(), children_count_); } | 538 return Vector<HeapGraphEdge>(children_arr(), children_count_); } |
539 Vector<HeapGraphEdge*> retainers() { | 539 Vector<HeapGraphEdge*> retainers() { |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 unsigned type_: 3; | 608 unsigned type_: 3; |
609 int children_count_: 27; | 609 int children_count_: 27; |
610 int retainers_count_; | 610 int retainers_count_; |
611 int self_size_; | 611 int self_size_; |
612 union { | 612 union { |
613 int ordered_index_; // Used during dominator tree building. | 613 int ordered_index_; // Used during dominator tree building. |
614 int retained_size_; // At that moment, there is no retained size yet. | 614 int retained_size_; // At that moment, there is no retained size yet. |
615 }; | 615 }; |
616 HeapEntry* dominator_; | 616 HeapEntry* dominator_; |
617 HeapSnapshot* snapshot_; | 617 HeapSnapshot* snapshot_; |
| 618 struct Id { |
| 619 uint32_t id1_; |
| 620 uint32_t id2_; |
| 621 } id_; // This is to avoid extra padding of 64-bit value on MSVC. |
618 const char* name_; | 622 const char* name_; |
619 uint64_t id_; | |
620 | 623 |
621 // Paints used for exact retained sizes calculation. | 624 // Paints used for exact retained sizes calculation. |
622 static const unsigned kUnpainted = 0; | 625 static const unsigned kUnpainted = 0; |
623 static const unsigned kPainted = 1; | 626 static const unsigned kPainted = 1; |
624 static const unsigned kPaintedReachableFromOthers = 2; | 627 static const unsigned kPaintedReachableFromOthers = 2; |
625 // Paints used for approximate retained sizes calculation. | 628 // Paints used for approximate retained sizes calculation. |
626 static const unsigned kLeaf = 0; | 629 static const unsigned kLeaf = 0; |
627 static const unsigned kNonLeaf = 1; | 630 static const unsigned kNonLeaf = 1; |
628 static const unsigned kProcessed = 2; | 631 static const unsigned kProcessed = 2; |
629 | 632 |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1067 friend class HeapSnapshotJSONSerializerIterator; | 1070 friend class HeapSnapshotJSONSerializerIterator; |
1068 | 1071 |
1069 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); | 1072 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); |
1070 }; | 1073 }; |
1071 | 1074 |
1072 } } // namespace v8::internal | 1075 } } // namespace v8::internal |
1073 | 1076 |
1074 #endif // ENABLE_LOGGING_AND_PROFILING | 1077 #endif // ENABLE_LOGGING_AND_PROFILING |
1075 | 1078 |
1076 #endif // V8_PROFILE_GENERATOR_H_ | 1079 #endif // V8_PROFILE_GENERATOR_H_ |
OLD | NEW |