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

Side by Side Diff: src/heap.cc

Issue 11367105: Put incremental code flushing behind a flag. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Toon Verwaest. Created 8 years, 1 month 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/flag-definitions.h ('k') | src/mark-compact.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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 #endif // DEBUG 413 #endif // DEBUG
414 } 414 }
415 415
416 416
417 void Heap::GarbageCollectionPrologue() { 417 void Heap::GarbageCollectionPrologue() {
418 isolate_->transcendental_cache()->Clear(); 418 isolate_->transcendental_cache()->Clear();
419 ClearJSFunctionResultCaches(); 419 ClearJSFunctionResultCaches();
420 gc_count_++; 420 gc_count_++;
421 unflattened_strings_length_ = 0; 421 unflattened_strings_length_ = 0;
422 422
423 bool should_enable_code_flushing = FLAG_flush_code; 423 if (FLAG_flush_code && FLAG_flush_code_incrementally) {
424 #ifdef ENABLE_DEBUGGER_SUPPORT 424 mark_compact_collector()->EnableCodeFlushing(true);
425 if (isolate_->debug()->IsLoaded() || isolate_->debug()->has_break_points()) {
426 should_enable_code_flushing = false;
427 } 425 }
428 #endif
429 mark_compact_collector()->EnableCodeFlushing(should_enable_code_flushing);
430 426
431 #ifdef VERIFY_HEAP 427 #ifdef VERIFY_HEAP
432 if (FLAG_verify_heap) { 428 if (FLAG_verify_heap) {
433 Verify(); 429 Verify();
434 } 430 }
435 #endif 431 #endif
436 432
437 #ifdef DEBUG 433 #ifdef DEBUG
438 ASSERT(allocation_allowed_ && gc_state_ == NOT_IN_GC); 434 ASSERT(allocation_allowed_ && gc_state_ == NOT_IN_GC);
439 allow_allocation(false); 435 allow_allocation(false);
(...skipping 6977 matching lines...) Expand 10 before | Expand all | Expand 10 after
7417 static_cast<int>(object_sizes_last_time_[index])); 7413 static_cast<int>(object_sizes_last_time_[index]));
7418 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) 7414 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT)
7419 #undef ADJUST_LAST_TIME_OBJECT_COUNT 7415 #undef ADJUST_LAST_TIME_OBJECT_COUNT
7420 7416
7421 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 7417 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
7422 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 7418 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
7423 ClearObjectStats(); 7419 ClearObjectStats();
7424 } 7420 }
7425 7421
7426 } } // namespace v8::internal 7422 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698