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

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

Issue 1206203002: [tracing] Fixing freelist snapshot of blink gc dump provider. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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
« 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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 for (BasePage* page = m_firstUnsweptPage; page; page = page->next()) { 565 for (BasePage* page = m_firstUnsweptPage; page; page = page->next()) {
566 if (page->contains(address)) 566 if (page->contains(address))
567 return true; 567 return true;
568 } 568 }
569 return false; 569 return false;
570 } 570 }
571 #endif 571 #endif
572 572
573 void NormalPageHeap::takeFreelistSnapshot(const String& dumpName) 573 void NormalPageHeap::takeFreelistSnapshot(const String& dumpName)
574 { 574 {
575 if (m_freeList.takeSnapshot(dumpName) && m_firstUnsweptPage) { 575 if (m_freeList.takeSnapshot(dumpName)) {
576 WebMemoryAllocatorDump* bucketsDump = BlinkGCMemoryDumpProvider::instanc e()->createMemoryAllocatorDumpForCurrentGC(dumpName + "/buckets"); 576 WebMemoryAllocatorDump* bucketsDump = BlinkGCMemoryDumpProvider::instanc e()->createMemoryAllocatorDumpForCurrentGC(dumpName + "/buckets");
577 WebMemoryAllocatorDump* pagesDump = BlinkGCMemoryDumpProvider::instance( )->createMemoryAllocatorDumpForCurrentGC(dumpName + "/pages"); 577 WebMemoryAllocatorDump* pagesDump = BlinkGCMemoryDumpProvider::instance( )->createMemoryAllocatorDumpForCurrentGC(dumpName + "/pages");
578 BlinkGCMemoryDumpProvider::instance()->currentProcessMemoryDump()->AddOw nershipEdge(pagesDump->guid(), bucketsDump->guid()); 578 BlinkGCMemoryDumpProvider::instance()->currentProcessMemoryDump()->AddOw nershipEdge(pagesDump->guid(), bucketsDump->guid());
579 } 579 }
580 } 580 }
581 581
582 #if ENABLE(GC_PROFILING) 582 #if ENABLE(GC_PROFILING)
583 void NormalPageHeap::snapshotFreeList(TracedValue& json) 583 void NormalPageHeap::snapshotFreeList(TracedValue& json)
584 { 584 {
585 json.setInteger("cumulativeAllocationSize", m_cumulativeAllocationSize); 585 json.setInteger("cumulativeAllocationSize", m_cumulativeAllocationSize);
(...skipping 1858 matching lines...) Expand 10 before | Expand all | Expand 10 after
2444 size_t Heap::s_allocatedObjectSize = 0; 2444 size_t Heap::s_allocatedObjectSize = 0;
2445 size_t Heap::s_allocatedSpace = 0; 2445 size_t Heap::s_allocatedSpace = 0;
2446 size_t Heap::s_markedObjectSize = 0; 2446 size_t Heap::s_markedObjectSize = 0;
2447 // We don't want to use 0 KB for the initial value because it may end up 2447 // We don't want to use 0 KB for the initial value because it may end up
2448 // triggering the first GC of some thread too prematurely. 2448 // triggering the first GC of some thread too prematurely.
2449 size_t Heap::s_estimatedLiveObjectSize = 512 * 1024; 2449 size_t Heap::s_estimatedLiveObjectSize = 512 * 1024;
2450 size_t Heap::s_externalObjectSizeAtLastGC = 0; 2450 size_t Heap::s_externalObjectSizeAtLastGC = 0;
2451 double Heap::s_estimatedMarkingTimePerByte = 0.0; 2451 double Heap::s_estimatedMarkingTimePerByte = 0.0;
2452 2452
2453 } // namespace blink 2453 } // 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