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

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

Issue 1193503002: Oilpan: Marking time measurement should not measure the time taken in postGC() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 2021 matching lines...) Expand 10 before | Expand all | Expand 10 after
2032 processMarkingStack(gcScope.visitor()); 2032 processMarkingStack(gcScope.visitor());
2033 2033
2034 postMarkingProcessing(gcScope.visitor()); 2034 postMarkingProcessing(gcScope.visitor());
2035 globalWeakProcessing(gcScope.visitor()); 2035 globalWeakProcessing(gcScope.visitor());
2036 2036
2037 // Now we can delete all orphaned pages because there are no dangling 2037 // Now we can delete all orphaned pages because there are no dangling
2038 // pointers to the orphaned pages. (If we have such dangling pointers, 2038 // pointers to the orphaned pages. (If we have such dangling pointers,
2039 // we should have crashed during marking before getting here.) 2039 // we should have crashed during marking before getting here.)
2040 orphanedPagePool()->decommitOrphanedPages(); 2040 orphanedPagePool()->decommitOrphanedPages();
2041 2041
2042 postGC(gcType);
2043
2044 double markingTimeInMilliseconds = WTF::currentTimeMS() - timeStamp; 2042 double markingTimeInMilliseconds = WTF::currentTimeMS() - timeStamp;
2045 s_estimatedMarkingTimePerByte = totalObjectSize ? (markingTimeInMilliseconds / 1000 / totalObjectSize) : 0; 2043 s_estimatedMarkingTimePerByte = totalObjectSize ? (markingTimeInMilliseconds / 1000 / totalObjectSize) : 0;
2046 2044
2047 Platform::current()->histogramCustomCounts("BlinkGC.CollectGarbage", marking TimeInMilliseconds, 0, 10 * 1000, 50); 2045 Platform::current()->histogramCustomCounts("BlinkGC.CollectGarbage", marking TimeInMilliseconds, 0, 10 * 1000, 50);
2048 Platform::current()->histogramCustomCounts("BlinkGC.TotalObjectSpace", Heap: :allocatedObjectSize() / 1024, 0, 4 * 1024 * 1024, 50); 2046 Platform::current()->histogramCustomCounts("BlinkGC.TotalObjectSpace", Heap: :allocatedObjectSize() / 1024, 0, 4 * 1024 * 1024, 50);
2049 Platform::current()->histogramCustomCounts("BlinkGC.TotalAllocatedSpace", He ap::allocatedSpace() / 1024, 0, 4 * 1024 * 1024, 50); 2047 Platform::current()->histogramCustomCounts("BlinkGC.TotalAllocatedSpace", He ap::allocatedSpace() / 1024, 0, 4 * 1024 * 1024, 50);
2050 Platform::current()->histogramEnumeration("BlinkGC.GCReason", reason, Number OfGCReason); 2048 Platform::current()->histogramEnumeration("BlinkGC.GCReason", reason, Number OfGCReason);
2051 Heap::reportMemoryUsageHistogram(); 2049 Heap::reportMemoryUsageHistogram();
2052 WTF::Partitions::reportMemoryUsageHistogram(); 2050 WTF::Partitions::reportMemoryUsageHistogram();
2053 2051
2052 postGC(gcType);
2053
2054 if (state->isMainThread()) 2054 if (state->isMainThread())
2055 ScriptForbiddenScope::exit(); 2055 ScriptForbiddenScope::exit();
2056 } 2056 }
2057 2057
2058 void Heap::collectGarbageForTerminatingThread(ThreadState* state) 2058 void Heap::collectGarbageForTerminatingThread(ThreadState* state)
2059 { 2059 {
2060 { 2060 {
2061 // A thread-specific termination GC must not allow other global GCs to g o 2061 // A thread-specific termination GC must not allow other global GCs to g o
2062 // ahead while it is running, hence the termination GC does not enter a 2062 // ahead while it is running, hence the termination GC does not enter a
2063 // safepoint. GCScope will not enter also a safepoint scope for 2063 // safepoint. GCScope will not enter also a safepoint scope for
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
2322 size_t Heap::s_allocatedObjectSize = 0; 2322 size_t Heap::s_allocatedObjectSize = 0;
2323 size_t Heap::s_allocatedSpace = 0; 2323 size_t Heap::s_allocatedSpace = 0;
2324 size_t Heap::s_markedObjectSize = 0; 2324 size_t Heap::s_markedObjectSize = 0;
2325 // We don't want to use 0 KB for the initial value because it may end up 2325 // We don't want to use 0 KB for the initial value because it may end up
2326 // triggering the first GC of some thread too prematurely. 2326 // triggering the first GC of some thread too prematurely.
2327 size_t Heap::s_estimatedLiveObjectSize = 512 * 1024; 2327 size_t Heap::s_estimatedLiveObjectSize = 512 * 1024;
2328 size_t Heap::s_externalObjectSizeAtLastGC = 0; 2328 size_t Heap::s_externalObjectSizeAtLastGC = 0;
2329 double Heap::s_estimatedMarkingTimePerByte = 0.0; 2329 double Heap::s_estimatedMarkingTimePerByte = 0.0;
2330 2330
2331 } // namespace blink 2331 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698