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

Side by Side Diff: src/spaces.cc

Issue 113819: - Introduce histograms collecting data about the number of set remembered set... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 7 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 | « src/heap.cc ('k') | 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 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2404 matching lines...) Expand 10 before | Expand all | Expand 10 after
2415 int extra_rset_bytes = ExtraRSetBytesFor(size); 2415 int extra_rset_bytes = ExtraRSetBytesFor(size);
2416 memset(object->address() + size, 0, extra_rset_bytes); 2416 memset(object->address() + size, 0, extra_rset_bytes);
2417 } 2417 }
2418 } 2418 }
2419 } 2419 }
2420 2420
2421 2421
2422 void LargeObjectSpace::IterateRSet(ObjectSlotCallback copy_object_func) { 2422 void LargeObjectSpace::IterateRSet(ObjectSlotCallback copy_object_func) {
2423 ASSERT(Page::is_rset_in_use()); 2423 ASSERT(Page::is_rset_in_use());
2424 2424
2425 static void* lo_rset_histogram = StatsTable::CreateHistogram(
2426 "V8.RSet_LO",
2427 0,
2428 // Keeping this histogram's buckets the same as the paged space histogram.
2429 Page::kObjectAreaSize / kPointerSize,
2430 30);
2431
2425 LargeObjectIterator it(this); 2432 LargeObjectIterator it(this);
2426 while (it.has_next()) { 2433 while (it.has_next()) {
2427 // We only have code, sequential strings, or fixed arrays in large 2434 // We only have code, sequential strings, or fixed arrays in large
2428 // object space, and only fixed arrays can possibly contain pointers to 2435 // object space, and only fixed arrays can possibly contain pointers to
2429 // the young generation. 2436 // the young generation.
2430 HeapObject* object = it.next(); 2437 HeapObject* object = it.next();
2431 if (object->IsFixedArray()) { 2438 if (object->IsFixedArray()) {
2432 // Iterate the normal page remembered set range. 2439 // Iterate the normal page remembered set range.
2433 Page* page = Page::FromAddress(object->address()); 2440 Page* page = Page::FromAddress(object->address());
2434 Address object_end = object->address() + object->Size(); 2441 Address object_end = object->address() + object->Size();
2435 Heap::IterateRSetRange(page->ObjectAreaStart(), 2442 int count = Heap::IterateRSetRange(page->ObjectAreaStart(),
2436 Min(page->ObjectAreaEnd(), object_end), 2443 Min(page->ObjectAreaEnd(), object_end),
2437 page->RSetStart(), 2444 page->RSetStart(),
2438 copy_object_func); 2445 copy_object_func);
2439 2446
2440 // Iterate the extra array elements. 2447 // Iterate the extra array elements.
2441 if (object_end > page->ObjectAreaEnd()) { 2448 if (object_end > page->ObjectAreaEnd()) {
2442 Heap::IterateRSetRange(page->ObjectAreaEnd(), object_end, 2449 count += Heap::IterateRSetRange(page->ObjectAreaEnd(), object_end,
2443 object_end, copy_object_func); 2450 object_end, copy_object_func);
2451 }
2452 if (lo_rset_histogram != NULL) {
2453 StatsTable::AddHistogramSample(lo_rset_histogram, count);
2444 } 2454 }
2445 } 2455 }
2446 } 2456 }
2447 } 2457 }
2448 2458
2449 2459
2450 void LargeObjectSpace::FreeUnmarkedObjects() { 2460 void LargeObjectSpace::FreeUnmarkedObjects() {
2451 LargeObjectChunk* previous = NULL; 2461 LargeObjectChunk* previous = NULL;
2452 LargeObjectChunk* current = first_chunk_; 2462 LargeObjectChunk* current = first_chunk_;
2453 while (current != NULL) { 2463 while (current != NULL) {
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
2607 reinterpret_cast<Object**>(object->address() 2617 reinterpret_cast<Object**>(object->address()
2608 + Page::kObjectAreaSize), 2618 + Page::kObjectAreaSize),
2609 allocation_top); 2619 allocation_top);
2610 PrintF("\n"); 2620 PrintF("\n");
2611 } 2621 }
2612 } 2622 }
2613 } 2623 }
2614 #endif // DEBUG 2624 #endif // DEBUG
2615 2625
2616 } } // namespace v8::internal 2626 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698