Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_PROFILER_HEAP_SNAPSHOT_GENERATOR_H_ | 5 #ifndef V8_PROFILER_HEAP_SNAPSHOT_GENERATOR_H_ |
| 6 #define V8_PROFILER_HEAP_SNAPSHOT_GENERATOR_H_ | 6 #define V8_PROFILER_HEAP_SNAPSHOT_GENERATOR_H_ |
| 7 | 7 |
| 8 #include "include/v8-profiler.h" | 8 #include "include/v8-profiler.h" |
| 9 #include "src/base/platform/time.h" | 9 #include "src/base/platform/time.h" |
| 10 #include "src/objects.h" | 10 #include "src/objects.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 42 DCHECK(type() == kElement || type() == kHidden); | 42 DCHECK(type() == kElement || type() == kHidden); |
| 43 return index_; | 43 return index_; |
| 44 } | 44 } |
| 45 const char* name() const { | 45 const char* name() const { |
| 46 DCHECK(type() == kContextVariable || type() == kProperty || | 46 DCHECK(type() == kContextVariable || type() == kProperty || |
| 47 type() == kInternal || type() == kShortcut || type() == kWeak); | 47 type() == kInternal || type() == kShortcut || type() == kWeak); |
| 48 return name_; | 48 return name_; |
| 49 } | 49 } |
| 50 INLINE(HeapEntry* from() const); | 50 INLINE(HeapEntry* from() const); |
| 51 HeapEntry* to() const { return to_entry_; } | 51 HeapEntry* to() const { return to_entry_; } |
| 52 INLINE(HeapSnapshot* snapshot() const); | |
|
vogelheim
2015/11/27 16:06:15
Not sure if worthwhile, but I think you're exposin
| |
| 52 | 53 |
| 53 private: | 54 private: |
| 54 INLINE(HeapSnapshot* snapshot() const); | |
| 55 int from_index() const { return FromIndexField::decode(bit_field_); } | 55 int from_index() const { return FromIndexField::decode(bit_field_); } |
| 56 | 56 |
| 57 class TypeField : public BitField<Type, 0, 3> {}; | 57 class TypeField : public BitField<Type, 0, 3> {}; |
| 58 class FromIndexField : public BitField<int, 3, 29> {}; | 58 class FromIndexField : public BitField<int, 3, 29> {}; |
| 59 uint32_t bit_field_; | 59 uint32_t bit_field_; |
| 60 union { | 60 union { |
| 61 // During entries population |to_index_| is used for storing the index, | 61 // During entries population |to_index_| is used for storing the index, |
| 62 // afterwards it is replaced with a pointer to the entry. | 62 // afterwards it is replaced with a pointer to the entry. |
| 63 int to_index_; | 63 int to_index_; |
| 64 HeapEntry* to_entry_; | 64 HeapEntry* to_entry_; |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 617 friend class HeapSnapshotJSONSerializerIterator; | 617 friend class HeapSnapshotJSONSerializerIterator; |
| 618 | 618 |
| 619 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); | 619 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); |
| 620 }; | 620 }; |
| 621 | 621 |
| 622 | 622 |
| 623 } // namespace internal | 623 } // namespace internal |
| 624 } // namespace v8 | 624 } // namespace v8 |
| 625 | 625 |
| 626 #endif // V8_PROFILER_HEAP_SNAPSHOT_GENERATOR_H_ | 626 #endif // V8_PROFILER_HEAP_SNAPSHOT_GENERATOR_H_ |
| OLD | NEW |