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

Side by Side Diff: src/heap.cc

Issue 14091013: Add a flag to deoptimize all functions every n garbage collections. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comment Created 7 years, 8 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.h ('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 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 store_buffer_(this), 150 store_buffer_(this),
151 marking_(this), 151 marking_(this),
152 incremental_marking_(this), 152 incremental_marking_(this),
153 number_idle_notifications_(0), 153 number_idle_notifications_(0),
154 last_idle_notification_gc_count_(0), 154 last_idle_notification_gc_count_(0),
155 last_idle_notification_gc_count_init_(false), 155 last_idle_notification_gc_count_init_(false),
156 mark_sweeps_since_idle_round_started_(0), 156 mark_sweeps_since_idle_round_started_(0),
157 ms_count_at_last_idle_notification_(0), 157 ms_count_at_last_idle_notification_(0),
158 gc_count_at_last_idle_gc_(0), 158 gc_count_at_last_idle_gc_(0),
159 scavenges_since_last_idle_round_(kIdleScavengeThreshold), 159 scavenges_since_last_idle_round_(kIdleScavengeThreshold),
160 gcs_since_last_deopt_(0),
160 #ifdef VERIFY_HEAP 161 #ifdef VERIFY_HEAP
161 no_weak_embedded_maps_verification_scope_depth_(0), 162 no_weak_embedded_maps_verification_scope_depth_(0),
162 #endif 163 #endif
163 promotion_queue_(this), 164 promotion_queue_(this),
164 configured_(false), 165 configured_(false),
165 chunks_queued_for_free_(NULL) { 166 chunks_queued_for_free_(NULL) {
166 // Allow build-time customization of the max semispace size. Building 167 // Allow build-time customization of the max semispace size. Building
167 // V8 with snapshots and a non-default max semispace size is much 168 // V8 with snapshots and a non-default max semispace size is much
168 // easier if you can define it as part of the build environment. 169 // easier if you can define it as part of the build environment.
169 #if defined(V8_MAX_SEMISPACE_SIZE) 170 #if defined(V8_MAX_SEMISPACE_SIZE)
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 } 481 }
481 #endif 482 #endif
482 483
483 #ifdef DEBUG 484 #ifdef DEBUG
484 allow_allocation(true); 485 allow_allocation(true);
485 if (FLAG_print_global_handles) isolate_->global_handles()->Print(); 486 if (FLAG_print_global_handles) isolate_->global_handles()->Print();
486 if (FLAG_print_handles) PrintHandles(); 487 if (FLAG_print_handles) PrintHandles();
487 if (FLAG_gc_verbose) Print(); 488 if (FLAG_gc_verbose) Print();
488 if (FLAG_code_stats) ReportCodeStatistics("After GC"); 489 if (FLAG_code_stats) ReportCodeStatistics("After GC");
489 #endif 490 #endif
491 if (FLAG_deopt_every_n_garbage_collections > 0) {
492 if (++gcs_since_last_deopt_ == FLAG_deopt_every_n_garbage_collections) {
493 Deoptimizer::DeoptimizeAll(isolate());
494 gcs_since_last_deopt_ = 0;
495 }
496 }
490 497
491 isolate_->counters()->alive_after_last_gc()->Set( 498 isolate_->counters()->alive_after_last_gc()->Set(
492 static_cast<int>(SizeOfObjects())); 499 static_cast<int>(SizeOfObjects()));
493 500
494 isolate_->counters()->string_table_capacity()->Set( 501 isolate_->counters()->string_table_capacity()->Set(
495 string_table()->Capacity()); 502 string_table()->Capacity());
496 isolate_->counters()->number_of_symbols()->Set( 503 isolate_->counters()->number_of_symbols()->Set(
497 string_table()->NumberOfElements()); 504 string_table()->NumberOfElements());
498 505
499 if (CommittedMemory() > 0) { 506 if (CommittedMemory() > 0) {
(...skipping 7353 matching lines...) Expand 10 before | Expand all | Expand 10 after
7853 static_cast<int>(object_sizes_last_time_[index])); 7860 static_cast<int>(object_sizes_last_time_[index]));
7854 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) 7861 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT)
7855 #undef ADJUST_LAST_TIME_OBJECT_COUNT 7862 #undef ADJUST_LAST_TIME_OBJECT_COUNT
7856 7863
7857 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 7864 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
7858 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 7865 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
7859 ClearObjectStats(); 7866 ClearObjectStats();
7860 } 7867 }
7861 7868
7862 } } // namespace v8::internal 7869 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698