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

Side by Side Diff: third_party/WebKit/Source/core/fetch/MemoryCache.cpp

Issue 2191533003: Refactor Timer classes in preparation for landing FrameTimers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 6
7 This library is free software; you can redistribute it and/or 7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public 8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either 9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version. 10 version 2 of the License, or (at your option) any later version.
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 { 738 {
739 MemoryCacheEntry* ex = getEntryForResource(x); 739 MemoryCacheEntry* ex = getEntryForResource(x);
740 MemoryCacheEntry* ey = getEntryForResource(y); 740 MemoryCacheEntry* ey = getEntryForResource(y);
741 ASSERT(ex); 741 ASSERT(ex);
742 ASSERT(ey); 742 ASSERT(ey);
743 return lruListFor(ex->m_accessCount, x->size()) == lruListFor(ey->m_accessCo unt, y->size()); 743 return lruListFor(ex->m_accessCount, x->size()) == lruListFor(ey->m_accessCo unt, y->size());
744 } 744 }
745 745
746 #ifdef MEMORY_CACHE_STATS 746 #ifdef MEMORY_CACHE_STATS
747 747
748 void MemoryCache::dumpStats(Timer<MemoryCache>*) 748 void MemoryCache::dumpStats(TimerBase*)
749 { 749 {
750 Statistics s = getStatistics(); 750 Statistics s = getStatistics();
751 printf("%-13s %-13s %-13s %-13s %-13s %-13s %-13s\n", "", "Count", "Size", " LiveSize", "DecodedSize", "PurgeableSize", "PurgedSize"); 751 printf("%-13s %-13s %-13s %-13s %-13s %-13s %-13s\n", "", "Count", "Size", " LiveSize", "DecodedSize", "PurgeableSize", "PurgedSize");
752 printf("%-13s %-13s %-13s %-13s %-13s %-13s %-13s\n", "-------------", "---- ---------", "-------------", "-------------", "-------------", "-------------", "-------------"); 752 printf("%-13s %-13s %-13s %-13s %-13s %-13s %-13s\n", "-------------", "---- ---------", "-------------", "-------------", "-------------", "-------------", "-------------");
753 printf("%-13s %13d %13d %13d %13d %13d %13d\n", "Images", s.images.count, s. images.size, s.images.liveSize, s.images.decodedSize, s.images.purgeableSize, s. images.purgedSize); 753 printf("%-13s %13d %13d %13d %13d %13d %13d\n", "Images", s.images.count, s. images.size, s.images.liveSize, s.images.decodedSize, s.images.purgeableSize, s. images.purgedSize);
754 printf("%-13s %13d %13d %13d %13d %13d %13d\n", "CSS", s.cssStyleSheets.coun t, s.cssStyleSheets.size, s.cssStyleSheets.liveSize, s.cssStyleSheets.decodedSiz e, s.cssStyleSheets.purgeableSize, s.cssStyleSheets.purgedSize); 754 printf("%-13s %13d %13d %13d %13d %13d %13d\n", "CSS", s.cssStyleSheets.coun t, s.cssStyleSheets.size, s.cssStyleSheets.liveSize, s.cssStyleSheets.decodedSiz e, s.cssStyleSheets.purgeableSize, s.cssStyleSheets.purgedSize);
755 printf("%-13s %13d %13d %13d %13d %13d %13d\n", "XSL", s.xslStyleSheets.coun t, s.xslStyleSheets.size, s.xslStyleSheets.liveSize, s.xslStyleSheets.decodedSiz e, s.xslStyleSheets.purgeableSize, s.xslStyleSheets.purgedSize); 755 printf("%-13s %13d %13d %13d %13d %13d %13d\n", "XSL", s.xslStyleSheets.coun t, s.xslStyleSheets.size, s.xslStyleSheets.liveSize, s.xslStyleSheets.decodedSiz e, s.xslStyleSheets.purgeableSize, s.xslStyleSheets.purgedSize);
756 printf("%-13s %13d %13d %13d %13d %13d %13d\n", "JavaScript", s.scripts.coun t, s.scripts.size, s.scripts.liveSize, s.scripts.decodedSize, s.scripts.purgeabl eSize, s.scripts.purgedSize); 756 printf("%-13s %13d %13d %13d %13d %13d %13d\n", "JavaScript", s.scripts.coun t, s.scripts.size, s.scripts.liveSize, s.scripts.decodedSize, s.scripts.purgeabl eSize, s.scripts.purgedSize);
757 printf("%-13s %13d %13d %13d %13d %13d %13d\n", "Fonts", s.fonts.count, s.fo nts.size, s.fonts.liveSize, s.fonts.decodedSize, s.fonts.purgeableSize, s.fonts. purgedSize); 757 printf("%-13s %13d %13d %13d %13d %13d %13d\n", "Fonts", s.fonts.count, s.fo nts.size, s.fonts.liveSize, s.fonts.decodedSize, s.fonts.purgeableSize, s.fonts. purgedSize);
758 printf("%-13s %13d %13d %13d %13d %13d %13d\n", "Other", s.other.count, s.ot her.size, s.other.liveSize, s.other.decodedSize, s.other.purgeableSize, s.other. purgedSize); 758 printf("%-13s %13d %13d %13d %13d %13d %13d\n", "Other", s.other.count, s.ot her.size, s.other.liveSize, s.other.decodedSize, s.other.purgeableSize, s.other. purgedSize);
(...skipping 22 matching lines...) Expand all
781 printf("(%.1fK, %.1fK, %uA, %dR, %d); ", currentResource->decode dSize() / 1024.0f, (currentResource->encodedSize() + currentResource->overheadSi ze()) / 1024.0f, current->m_accessCount, currentResource->hasClientsOrObservers( ), currentResource->isPurgeable()); 781 printf("(%.1fK, %.1fK, %uA, %dR, %d); ", currentResource->decode dSize() / 1024.0f, (currentResource->encodedSize() + currentResource->overheadSi ze()) / 1024.0f, current->m_accessCount, currentResource->hasClientsOrObservers( ), currentResource->isPurgeable());
782 782
783 current = current->m_previousInAllResourcesList; 783 current = current->m_previousInAllResourcesList;
784 } 784 }
785 } 785 }
786 } 786 }
787 787
788 #endif // MEMORY_CACHE_STATS 788 #endif // MEMORY_CACHE_STATS
789 789
790 } // namespace blink 790 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698