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

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

Issue 2197923002: Not for landing: Profile Elliott's parsing benchmark Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: temp 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) 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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | third_party/WebKit/Source/platform/heap/ThreadState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698