| OLD | NEW |
| 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 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 | 563 |
| 564 double markingTimeInMilliseconds = WTF::currentTimeMS() - startTime; | 564 double markingTimeInMilliseconds = WTF::currentTimeMS() - startTime; |
| 565 state->heap().heapStats().setEstimatedMarkingTimePerByte(totalObjectSize ? (
markingTimeInMilliseconds / 1000 / totalObjectSize) : 0); | 565 state->heap().heapStats().setEstimatedMarkingTimePerByte(totalObjectSize ? (
markingTimeInMilliseconds / 1000 / totalObjectSize) : 0); |
| 566 | 566 |
| 567 #if PRINT_HEAP_STATS | 567 #if PRINT_HEAP_STATS |
| 568 dataLogF("ThreadHeap::collectGarbage (gcReason=%s, lazySweeping=%d, time=%.1
lfms)\n", gcReasonString(reason), gcType == BlinkGC::GCWithoutSweep, markingTime
InMilliseconds); | 568 dataLogF("ThreadHeap::collectGarbage (gcReason=%s, lazySweeping=%d, time=%.1
lfms)\n", gcReasonString(reason), gcType == BlinkGC::GCWithoutSweep, markingTime
InMilliseconds); |
| 569 #endif | 569 #endif |
| 570 | 570 |
| 571 DEFINE_THREAD_SAFE_STATIC_LOCAL(CustomCountHistogram, markingTimeHistogram,
new CustomCountHistogram("BlinkGC.CollectGarbage", 0, 10 * 1000, 50)); | 571 DEFINE_THREAD_SAFE_STATIC_LOCAL(CustomCountHistogram, markingTimeHistogram,
new CustomCountHistogram("BlinkGC.CollectGarbage", 0, 10 * 1000, 50)); |
| 572 markingTimeHistogram.count(markingTimeInMilliseconds); | 572 markingTimeHistogram.count(markingTimeInMilliseconds); |
| 573 fprintf(stderr, "Oilpan marking: %.2lf ms\n", markingTimeInMilliseconds); |
| 574 |
| 573 DEFINE_THREAD_SAFE_STATIC_LOCAL(CustomCountHistogram, totalObjectSpaceHistog
ram, new CustomCountHistogram("BlinkGC.TotalObjectSpace", 0, 4 * 1024 * 1024, 50
)); | 575 DEFINE_THREAD_SAFE_STATIC_LOCAL(CustomCountHistogram, totalObjectSpaceHistog
ram, new CustomCountHistogram("BlinkGC.TotalObjectSpace", 0, 4 * 1024 * 1024, 50
)); |
| 574 totalObjectSpaceHistogram.count(ProcessHeap::totalAllocatedObjectSize() / 10
24); | 576 totalObjectSpaceHistogram.count(ProcessHeap::totalAllocatedObjectSize() / 10
24); |
| 575 DEFINE_THREAD_SAFE_STATIC_LOCAL(CustomCountHistogram, totalAllocatedSpaceHis
togram, new CustomCountHistogram("BlinkGC.TotalAllocatedSpace", 0, 4 * 1024 * 10
24, 50)); | 577 DEFINE_THREAD_SAFE_STATIC_LOCAL(CustomCountHistogram, totalAllocatedSpaceHis
togram, new CustomCountHistogram("BlinkGC.TotalAllocatedSpace", 0, 4 * 1024 * 10
24, 50)); |
| 576 totalAllocatedSpaceHistogram.count(ProcessHeap::totalAllocatedSpace() / 1024
); | 578 totalAllocatedSpaceHistogram.count(ProcessHeap::totalAllocatedSpace() / 1024
); |
| 577 DEFINE_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, gcReasonHistogram, new
EnumerationHistogram("BlinkGC.GCReason", BlinkGC::NumberOfGCReason)); | 579 DEFINE_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, gcReasonHistogram, new
EnumerationHistogram("BlinkGC.GCReason", BlinkGC::NumberOfGCReason)); |
| 578 gcReasonHistogram.count(reason); | 580 gcReasonHistogram.count(reason); |
| 579 | 581 |
| 580 state->heap().m_lastGCReason = reason; | 582 state->heap().m_lastGCReason = reason; |
| 581 | 583 |
| 582 ThreadHeap::reportMemoryUsageHistogram(); | 584 ThreadHeap::reportMemoryUsageHistogram(); |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 809 ProcessHeap::decreaseTotalMarkedObjectSize(m_stats.markedObjectSize()); | 811 ProcessHeap::decreaseTotalMarkedObjectSize(m_stats.markedObjectSize()); |
| 810 | 812 |
| 811 m_stats.reset(); | 813 m_stats.reset(); |
| 812 for (ThreadState* state : m_threads) | 814 for (ThreadState* state : m_threads) |
| 813 state->resetHeapCounters(); | 815 state->resetHeapCounters(); |
| 814 } | 816 } |
| 815 | 817 |
| 816 ThreadHeap* ThreadHeap::s_mainThreadHeap = nullptr; | 818 ThreadHeap* ThreadHeap::s_mainThreadHeap = nullptr; |
| 817 | 819 |
| 818 } // namespace blink | 820 } // namespace blink |
| OLD | NEW |