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

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

Issue 728753002: Oilpan: Remove Heap::getStats (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/heap/Heap.h ('k') | no next file » | 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 2772 matching lines...) Expand 10 before | Expand all | Expand 10 after
2783 *allocatedSpaceSize = 0; 2783 *allocatedSpaceSize = 0;
2784 ASSERT(ThreadState::isAnyThreadInGC()); 2784 ASSERT(ThreadState::isAnyThreadInGC());
2785 ThreadState::AttachedThreadStateSet& threads = ThreadState::attachedThreads( ); 2785 ThreadState::AttachedThreadStateSet& threads = ThreadState::attachedThreads( );
2786 typedef ThreadState::AttachedThreadStateSet::iterator ThreadStateIterator; 2786 typedef ThreadState::AttachedThreadStateSet::iterator ThreadStateIterator;
2787 for (ThreadStateIterator it = threads.begin(), end = threads.end(); it != en d; ++it) { 2787 for (ThreadStateIterator it = threads.begin(), end = threads.end(); it != en d; ++it) {
2788 *objectSpaceSize += (*it)->stats().totalObjectSpace(); 2788 *objectSpaceSize += (*it)->stats().totalObjectSpace();
2789 *allocatedSpaceSize += (*it)->stats().totalAllocatedSpace(); 2789 *allocatedSpaceSize += (*it)->stats().totalAllocatedSpace();
2790 } 2790 }
2791 } 2791 }
2792 2792
2793 void Heap::getStats(HeapStats* stats)
2794 {
2795 stats->clear();
2796 ASSERT(ThreadState::isAnyThreadInGC());
2797 ThreadState::AttachedThreadStateSet& threads = ThreadState::attachedThreads( );
2798 typedef ThreadState::AttachedThreadStateSet::iterator ThreadStateIterator;
2799 for (ThreadStateIterator it = threads.begin(), end = threads.end(); it != en d; ++it) {
2800 HeapStats temp;
2801 (*it)->getStats(temp);
2802 stats->add(&temp);
2803 }
2804 }
2805
2806 void Heap::getStatsForTesting(HeapStats* stats) 2793 void Heap::getStatsForTesting(HeapStats* stats)
2807 { 2794 {
2808 stats->clear(); 2795 stats->clear();
2809 ASSERT(ThreadState::isAnyThreadInGC()); 2796 ASSERT(ThreadState::isAnyThreadInGC());
2810 makeConsistentForSweeping(); 2797 makeConsistentForSweeping();
2811 ThreadState::AttachedThreadStateSet& threads = ThreadState::attachedThreads( ); 2798 ThreadState::AttachedThreadStateSet& threads = ThreadState::attachedThreads( );
2812 typedef ThreadState::AttachedThreadStateSet::iterator ThreadStateIterator; 2799 typedef ThreadState::AttachedThreadStateSet::iterator ThreadStateIterator;
2813 for (ThreadStateIterator it = threads.begin(), end = threads.end(); it != en d; ++it) { 2800 for (ThreadStateIterator it = threads.begin(), end = threads.end(); it != en d; ++it) {
2814 HeapStats temp; 2801 HeapStats temp;
2815 (*it)->getStatsForTesting(temp); 2802 (*it)->getStatsForTesting(temp);
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
2968 CallbackStack* Heap::s_weakCallbackStack; 2955 CallbackStack* Heap::s_weakCallbackStack;
2969 CallbackStack* Heap::s_ephemeronStack; 2956 CallbackStack* Heap::s_ephemeronStack;
2970 HeapDoesNotContainCache* Heap::s_heapDoesNotContainCache; 2957 HeapDoesNotContainCache* Heap::s_heapDoesNotContainCache;
2971 bool Heap::s_shutdownCalled = false; 2958 bool Heap::s_shutdownCalled = false;
2972 bool Heap::s_lastGCWasConservative = false; 2959 bool Heap::s_lastGCWasConservative = false;
2973 FreePagePool* Heap::s_freePagePool; 2960 FreePagePool* Heap::s_freePagePool;
2974 OrphanedPagePool* Heap::s_orphanedPagePool; 2961 OrphanedPagePool* Heap::s_orphanedPagePool;
2975 Heap::RegionTree* Heap::s_regionTree = 0; 2962 Heap::RegionTree* Heap::s_regionTree = 0;
2976 2963
2977 } // namespace blink 2964 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/heap/Heap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698