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

Side by Side Diff: src/heap.cc

Issue 132063004: More efficient use of space in AllocationSite. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE Created 6 years, 11 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/code-stubs-hydrogen.cc ('k') | src/heap-snapshot-generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 bool use_scratchpad = 519 bool use_scratchpad =
520 allocation_sites_scratchpad_length < kAllocationSiteScratchpadSize; 520 allocation_sites_scratchpad_length < kAllocationSiteScratchpadSize;
521 521
522 int i = 0; 522 int i = 0;
523 Object* list_element = allocation_sites_list(); 523 Object* list_element = allocation_sites_list();
524 while (use_scratchpad ? 524 while (use_scratchpad ?
525 i < allocation_sites_scratchpad_length : 525 i < allocation_sites_scratchpad_length :
526 list_element->IsAllocationSite()) { 526 list_element->IsAllocationSite()) {
527 AllocationSite* site = use_scratchpad ? 527 AllocationSite* site = use_scratchpad ?
528 allocation_sites_scratchpad[i] : AllocationSite::cast(list_element); 528 allocation_sites_scratchpad[i] : AllocationSite::cast(list_element);
529 allocation_mementos_found += site->memento_found_count()->value(); 529 allocation_mementos_found += site->memento_found_count();
530 if (site->memento_found_count()->value() > 0) { 530 if (site->memento_found_count() > 0) {
531 active_allocation_sites++; 531 active_allocation_sites++;
532 } 532 }
533 if (site->DigestPretenuringFeedback()) { 533 if (site->DigestPretenuringFeedback()) {
534 if (site->GetPretenureMode() == TENURED) { 534 if (site->GetPretenureMode() == TENURED) {
535 tenure_decisions++; 535 tenure_decisions++;
536 } else { 536 } else {
537 dont_tenure_decisions++; 537 dont_tenure_decisions++;
538 } 538 }
539 } 539 }
540 allocation_sites++; 540 allocation_sites++;
(...skipping 7237 matching lines...) Expand 10 before | Expand all | Expand 10 after
7778 static_cast<int>(object_sizes_last_time_[index])); 7778 static_cast<int>(object_sizes_last_time_[index]));
7779 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 7779 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
7780 #undef ADJUST_LAST_TIME_OBJECT_COUNT 7780 #undef ADJUST_LAST_TIME_OBJECT_COUNT
7781 7781
7782 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 7782 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
7783 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 7783 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
7784 ClearObjectStats(); 7784 ClearObjectStats();
7785 } 7785 }
7786 7786
7787 } } // namespace v8::internal 7787 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/heap-snapshot-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698