Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2009-2010 the V8 project authors. All rights reserved. | 1 // Copyright 2009-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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 77 | 77 |
| 78 v8::RetainedObjectInfo* ExecuteWrapperClassCallback(uint16_t class_id, | 78 v8::RetainedObjectInfo* ExecuteWrapperClassCallback(uint16_t class_id, |
| 79 Object** wrapper); | 79 Object** wrapper); |
| 80 INLINE(bool is_profiling()) { | 80 INLINE(bool is_profiling()) { |
| 81 return snapshots_->is_tracking_objects(); | 81 return snapshots_->is_tracking_objects(); |
| 82 } | 82 } |
| 83 | 83 |
| 84 void SetRetainedObjectInfo(UniqueId id, RetainedObjectInfo* info); | 84 void SetRetainedObjectInfo(UniqueId id, RetainedObjectInfo* info); |
| 85 | 85 |
| 86 bool is_tracking_allocations() { | 86 bool is_tracking_allocations() { |
| 87 return is_tracking_allocations_; | 87 return is_tracking_allocations_ || |
| 88 FLAG_heap_profiler_always_track_allocations; | |
|
yurys
2013/10/28 08:17:25
Should we also call HeapProfiler::StartHeapObjects
| |
| 88 } | 89 } |
| 89 | 90 |
| 90 void StartHeapAllocationsRecording(); | 91 void StartHeapAllocationsRecording(); |
| 91 void StopHeapAllocationsRecording(); | 92 void StopHeapAllocationsRecording(); |
| 92 | 93 |
| 93 int FindUntrackedObjects() { | 94 int FindUntrackedObjects() { |
| 94 return snapshots_->FindUntrackedObjects(); | 95 return snapshots_->FindUntrackedObjects(); |
| 95 } | 96 } |
| 96 | 97 |
| 97 void DropCompiledCode(); | 98 void DropCompiledCode(); |
| 98 | 99 |
| 99 private: | 100 private: |
| 100 Heap* heap() const { return snapshots_->heap(); } | 101 Heap* heap() const { return snapshots_->heap(); } |
| 101 | 102 |
| 102 HeapSnapshotsCollection* snapshots_; | 103 HeapSnapshotsCollection* snapshots_; |
| 103 unsigned next_snapshot_uid_; | 104 unsigned next_snapshot_uid_; |
| 104 List<v8::HeapProfiler::WrapperInfoCallback> wrapper_callbacks_; | 105 List<v8::HeapProfiler::WrapperInfoCallback> wrapper_callbacks_; |
| 105 bool is_tracking_allocations_; | 106 bool is_tracking_allocations_; |
| 106 }; | 107 }; |
| 107 | 108 |
| 108 } } // namespace v8::internal | 109 } } // namespace v8::internal |
| 109 | 110 |
| 110 #endif // V8_HEAP_PROFILER_H_ | 111 #endif // V8_HEAP_PROFILER_H_ |
| OLD | NEW |