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

Side by Side Diff: src/heap.cc

Issue 7105016: Ensure strings are never externalized as a side-effect of doing a GC. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 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 | Annotate | Revision Log
« src/heap.h ('K') | « 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 linear_allocation_scope_depth_(0), 100 linear_allocation_scope_depth_(0),
101 contexts_disposed_(0), 101 contexts_disposed_(0),
102 new_space_(this), 102 new_space_(this),
103 old_pointer_space_(NULL), 103 old_pointer_space_(NULL),
104 old_data_space_(NULL), 104 old_data_space_(NULL),
105 code_space_(NULL), 105 code_space_(NULL),
106 map_space_(NULL), 106 map_space_(NULL),
107 cell_space_(NULL), 107 cell_space_(NULL),
108 lo_space_(NULL), 108 lo_space_(NULL),
109 gc_state_(NOT_IN_GC), 109 gc_state_(NOT_IN_GC),
110 gc_post_process_count_(0),
110 mc_count_(0), 111 mc_count_(0),
111 ms_count_(0), 112 ms_count_(0),
112 gc_count_(0), 113 gc_count_(0),
113 unflattened_strings_length_(0), 114 unflattened_strings_length_(0),
114 #ifdef DEBUG 115 #ifdef DEBUG
115 allocation_allowed_(true), 116 allocation_allowed_(true),
116 allocation_timeout_(0), 117 allocation_timeout_(0),
117 disallow_allocation_failure_(false), 118 disallow_allocation_failure_(false),
118 debug_utils_(NULL), 119 debug_utils_(NULL),
119 #endif // DEBUG 120 #endif // DEBUG
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 old_gen_exhausted_ = false; 787 old_gen_exhausted_ = false;
787 } else { 788 } else {
788 tracer_ = tracer; 789 tracer_ = tracer;
789 Scavenge(); 790 Scavenge();
790 tracer_ = NULL; 791 tracer_ = NULL;
791 792
792 UpdateSurvivalRateTrend(start_new_space_size); 793 UpdateSurvivalRateTrend(start_new_space_size);
793 } 794 }
794 795
795 isolate_->counters()->objs_since_last_young()->Set(0); 796 isolate_->counters()->objs_since_last_young()->Set(0);
796 797
798 gc_post_process_count_++;
797 { DisableAssertNoAllocation allow_allocation; 799 { DisableAssertNoAllocation allow_allocation;
798 GCTracer::Scope scope(tracer, GCTracer::Scope::EXTERNAL); 800 GCTracer::Scope scope(tracer, GCTracer::Scope::EXTERNAL);
799 next_gc_likely_to_collect_more = 801 next_gc_likely_to_collect_more =
800 isolate_->global_handles()->PostGarbageCollectionProcessing(collector); 802 isolate_->global_handles()->PostGarbageCollectionProcessing(collector);
801 } 803 }
804 gc_post_process_count_--;
802 805
803 // Update relocatables. 806 // Update relocatables.
804 Relocatable::PostGarbageCollectionProcessing(); 807 Relocatable::PostGarbageCollectionProcessing();
805 808
806 if (collector == MARK_COMPACTOR) { 809 if (collector == MARK_COMPACTOR) {
807 // Register the amount of external allocated memory. 810 // Register the amount of external allocated memory.
808 amount_of_external_allocated_memory_at_last_global_gc_ = 811 amount_of_external_allocated_memory_at_last_global_gc_ =
809 amount_of_external_allocated_memory_; 812 amount_of_external_allocated_memory_;
810 } 813 }
811 814
(...skipping 5134 matching lines...) Expand 10 before | Expand all | Expand 10 after
5946 } 5949 }
5947 5950
5948 5951
5949 void ExternalStringTable::TearDown() { 5952 void ExternalStringTable::TearDown() {
5950 new_space_strings_.Free(); 5953 new_space_strings_.Free();
5951 old_space_strings_.Free(); 5954 old_space_strings_.Free();
5952 } 5955 }
5953 5956
5954 5957
5955 } } // namespace v8::internal 5958 } } // namespace v8::internal
OLDNEW
« src/heap.h ('K') | « src/heap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698