Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/profiler/heap-snapshot-generator.h

Issue 1555553002: [profiler] Implement POC Sampling Heap Profiler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cleanup samples when sampling heap profiler is stopped Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 #include "src/profiler/heap-profiler.h"
11 #include "src/profiler/strings-storage.h" 12 #include "src/profiler/strings-storage.h"
12 13
13 namespace v8 { 14 namespace v8 {
14 namespace internal { 15 namespace internal {
15 16
16 class AllocationTracker; 17 class AllocationTracker;
17 class AllocationTraceNode; 18 class AllocationTraceNode;
18 class HeapEntry; 19 class HeapEntry;
19 class HeapIterator; 20 class HeapIterator;
20 class HeapProfiler; 21 class HeapProfiler;
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 // Mapping from HeapThing pointers to HeapEntry* pointers. 559 // Mapping from HeapThing pointers to HeapEntry* pointers.
559 HeapEntriesMap entries_; 560 HeapEntriesMap entries_;
560 // Used during snapshot generation. 561 // Used during snapshot generation.
561 int progress_counter_; 562 int progress_counter_;
562 int progress_total_; 563 int progress_total_;
563 Heap* heap_; 564 Heap* heap_;
564 565
565 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotGenerator); 566 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotGenerator);
566 }; 567 };
567 568
568 class OutputStreamWriter;
569
570 class HeapSnapshotJSONSerializer { 569 class HeapSnapshotJSONSerializer {
571 public: 570 public:
572 explicit HeapSnapshotJSONSerializer(HeapSnapshot* snapshot) 571 explicit HeapSnapshotJSONSerializer(HeapSnapshot* snapshot)
573 : snapshot_(snapshot), 572 : snapshot_(snapshot),
574 strings_(StringsMatch), 573 strings_(StringsMatch),
575 next_node_id_(1), 574 next_node_id_(1),
576 next_string_id_(1), 575 next_string_id_(1),
577 writer_(NULL) { 576 writer_(NULL) {
578 } 577 }
579 void Serialize(v8::OutputStream* stream); 578 void Serialize(v8::OutputStream* stream);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 friend class HeapSnapshotJSONSerializerIterator; 618 friend class HeapSnapshotJSONSerializerIterator;
620 619
621 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); 620 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer);
622 }; 621 };
623 622
624 623
625 } // namespace internal 624 } // namespace internal
626 } // namespace v8 625 } // namespace v8
627 626
628 #endif // V8_PROFILER_HEAP_SNAPSHOT_GENERATOR_H_ 627 #endif // V8_PROFILER_HEAP_SNAPSHOT_GENERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698