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

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

Issue 1200833008: Adding freelist statistics to blink gc dump provider. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@oilpan_n2
Patch Set: Nits. 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
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 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 } 635 }
636 BaseHeap* expandedVectorBackingHeap(size_t gcInfoIndex); 636 BaseHeap* expandedVectorBackingHeap(size_t gcInfoIndex);
637 static bool isVectorHeapIndex(int heapIndex) 637 static bool isVectorHeapIndex(int heapIndex)
638 { 638 {
639 return Vector1HeapIndex <= heapIndex && heapIndex <= Vector4HeapIndex; 639 return Vector1HeapIndex <= heapIndex && heapIndex <= Vector4HeapIndex;
640 } 640 }
641 void allocationPointAdjusted(int heapIndex); 641 void allocationPointAdjusted(int heapIndex);
642 void promptlyFreed(size_t gcInfoIndex); 642 void promptlyFreed(size_t gcInfoIndex);
643 643
644 private: 644 private:
645 enum SnapshotType {
646 HeapSnapshot,
647 FreelistSnapshot
648 };
649
645 ThreadState(); 650 ThreadState();
646 ~ThreadState(); 651 ~ThreadState();
647 652
648 NO_SANITIZE_ADDRESS void copyStackUntilSafePointScope(); 653 NO_SANITIZE_ADDRESS void copyStackUntilSafePointScope();
649 void clearSafePointScopeMarker() 654 void clearSafePointScopeMarker()
650 { 655 {
651 m_safePointStackCopy.clear(); 656 m_safePointStackCopy.clear();
652 m_safePointScopeMarker = nullptr; 657 m_safePointScopeMarker = nullptr;
653 } 658 }
654 659
(...skipping 27 matching lines...) Expand all
682 // to sweep away any objects that are left on this heap. 687 // to sweep away any objects that are left on this heap.
683 // We assert that nothing must remain after this cleanup. 688 // We assert that nothing must remain after this cleanup.
684 // If assertion does not hold we crash as we are potentially 689 // If assertion does not hold we crash as we are potentially
685 // in the dangling pointer situation. 690 // in the dangling pointer situation.
686 void cleanup(); 691 void cleanup();
687 void cleanupPages(); 692 void cleanupPages();
688 693
689 void unregisterPreFinalizerInternal(void*); 694 void unregisterPreFinalizerInternal(void*);
690 void invokePreFinalizers(); 695 void invokePreFinalizers();
691 696
692 void takeSnapshot(); 697 void takeSnapshot(SnapshotType);
693 #if ENABLE(GC_PROFILING) 698 #if ENABLE(GC_PROFILING)
694 void snapshotFreeList(); 699 void snapshotFreeList();
695 #endif 700 #endif
696 void clearHeapAges(); 701 void clearHeapAges();
697 int heapIndexOfVectorHeapLeastRecentlyExpanded(int beginHeapIndex, int endHe apIndex); 702 int heapIndexOfVectorHeapLeastRecentlyExpanded(int beginHeapIndex, int endHe apIndex);
698 703
699 friend class SafePointAwareMutexLocker; 704 friend class SafePointAwareMutexLocker;
700 friend class SafePointBarrier; 705 friend class SafePointBarrier;
701 friend class SafePointScope; 706 friend class SafePointScope;
702 707
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 }; 780 };
776 781
777 template<> class ThreadStateFor<AnyThread> { 782 template<> class ThreadStateFor<AnyThread> {
778 public: 783 public:
779 static ThreadState* state() { return ThreadState::current(); } 784 static ThreadState* state() { return ThreadState::current(); }
780 }; 785 };
781 786
782 } // namespace blink 787 } // namespace blink
783 788
784 #endif // ThreadState_h 789 #endif // ThreadState_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698