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

Side by Side Diff: Source/platform/heap/Heap.h

Issue 1149673002: Adding blink gc memory dump infrastructure for thread specific dumps. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase and replacing main thread with thread id. Created 5 years, 6 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
« no previous file with comments | « Source/platform/heap/BlinkGCMemoryDumpProvider.cpp ('k') | Source/platform/heap/Heap.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 // 676 //
677 // BaseHeap is a parent class of NormalPageHeap and LargeObjectHeap. 677 // BaseHeap is a parent class of NormalPageHeap and LargeObjectHeap.
678 // NormalPageHeap represents a heap that contains NormalPages 678 // NormalPageHeap represents a heap that contains NormalPages
679 // and LargeObjectHeap represents a heap that contains LargeObjectPages. 679 // and LargeObjectHeap represents a heap that contains LargeObjectPages.
680 class PLATFORM_EXPORT BaseHeap { 680 class PLATFORM_EXPORT BaseHeap {
681 public: 681 public:
682 BaseHeap(ThreadState*, int); 682 BaseHeap(ThreadState*, int);
683 virtual ~BaseHeap(); 683 virtual ~BaseHeap();
684 void cleanupPages(); 684 void cleanupPages();
685 685
686 void takeSnapshot(const String& dumpBaseName);
686 #if ENABLE(ASSERT) || ENABLE(GC_PROFILING) 687 #if ENABLE(ASSERT) || ENABLE(GC_PROFILING)
687 BasePage* findPageFromAddress(Address); 688 BasePage* findPageFromAddress(Address);
688 #endif 689 #endif
689 #if ENABLE(GC_PROFILING) 690 #if ENABLE(GC_PROFILING)
690 void snapshot(TracedValue*, ThreadState::SnapshotInfo*); 691 void snapshot(TracedValue*, ThreadState::SnapshotInfo*);
691 virtual void snapshotFreeList(TracedValue&) { }; 692 virtual void snapshotFreeList(TracedValue&) { };
692 693
693 void countMarkedObjects(ClassAgeCountsMap&) const; 694 void countMarkedObjects(ClassAgeCountsMap&) const;
694 void countObjectsToSweep(ClassAgeCountsMap&) const; 695 void countObjectsToSweep(ClassAgeCountsMap&) const;
695 void incrementMarkedObjectsAge(); 696 void incrementMarkedObjectsAge();
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
1382 size_t copySize = previousHeader->payloadSize(); 1383 size_t copySize = previousHeader->payloadSize();
1383 if (copySize > size) 1384 if (copySize > size)
1384 copySize = size; 1385 copySize = size;
1385 memcpy(address, previous, copySize); 1386 memcpy(address, previous, copySize);
1386 return address; 1387 return address;
1387 } 1388 }
1388 1389
1389 } // namespace blink 1390 } // namespace blink
1390 1391
1391 #endif // Heap_h 1392 #endif // Heap_h
OLDNEW
« no previous file with comments | « Source/platform/heap/BlinkGCMemoryDumpProvider.cpp ('k') | Source/platform/heap/Heap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698