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

Side by Side Diff: src/mksnapshot.cc

Issue 16631002: Separate Cell and PropertyCell spaces (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove Mips changes Created 7 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
« no previous file with comments | « src/mark-compact.cc ('k') | src/objects.h » ('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 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 fclose(fp_); 165 fclose(fp_);
166 } 166 }
167 167
168 void WriteSpaceUsed( 168 void WriteSpaceUsed(
169 const char* prefix, 169 const char* prefix,
170 int new_space_used, 170 int new_space_used,
171 int pointer_space_used, 171 int pointer_space_used,
172 int data_space_used, 172 int data_space_used,
173 int code_space_used, 173 int code_space_used,
174 int map_space_used, 174 int map_space_used,
175 int cell_space_used) { 175 int cell_space_used,
176 int property_cell_space_used) {
176 fprintf(fp_, 177 fprintf(fp_,
177 "const int Snapshot::%snew_space_used_ = %d;\n", 178 "const int Snapshot::%snew_space_used_ = %d;\n",
178 prefix, 179 prefix,
179 new_space_used); 180 new_space_used);
180 fprintf(fp_, 181 fprintf(fp_,
181 "const int Snapshot::%spointer_space_used_ = %d;\n", 182 "const int Snapshot::%spointer_space_used_ = %d;\n",
182 prefix, 183 prefix,
183 pointer_space_used); 184 pointer_space_used);
184 fprintf(fp_, 185 fprintf(fp_,
185 "const int Snapshot::%sdata_space_used_ = %d;\n", 186 "const int Snapshot::%sdata_space_used_ = %d;\n",
186 prefix, 187 prefix,
187 data_space_used); 188 data_space_used);
188 fprintf(fp_, 189 fprintf(fp_,
189 "const int Snapshot::%scode_space_used_ = %d;\n", 190 "const int Snapshot::%scode_space_used_ = %d;\n",
190 prefix, 191 prefix,
191 code_space_used); 192 code_space_used);
192 fprintf(fp_, 193 fprintf(fp_,
193 "const int Snapshot::%smap_space_used_ = %d;\n", 194 "const int Snapshot::%smap_space_used_ = %d;\n",
194 prefix, 195 prefix,
195 map_space_used); 196 map_space_used);
196 fprintf(fp_, 197 fprintf(fp_,
197 "const int Snapshot::%scell_space_used_ = %d;\n", 198 "const int Snapshot::%scell_space_used_ = %d;\n",
198 prefix, 199 prefix,
199 cell_space_used); 200 cell_space_used);
201 fprintf(fp_,
202 "const int Snapshot::%sproperty_cell_space_used_ = %d;\n",
203 prefix,
204 property_cell_space_used);
200 } 205 }
201 206
202 void WritePartialSnapshot() { 207 void WritePartialSnapshot() {
203 int length = partial_sink_.Position(); 208 int length = partial_sink_.Position();
204 fprintf(fp_, "};\n\n"); 209 fprintf(fp_, "};\n\n");
205 fprintf(fp_, "const int Snapshot::context_size_ = %d;\n", length); 210 fprintf(fp_, "const int Snapshot::context_size_ = %d;\n", length);
206 #ifdef COMPRESS_STARTUP_DATA_BZ2 211 #ifdef COMPRESS_STARTUP_DATA_BZ2
207 fprintf(fp_, 212 fprintf(fp_,
208 "const int Snapshot::context_raw_size_ = %d;\n", 213 "const int Snapshot::context_raw_size_ = %d;\n",
209 partial_sink_.raw_size()); 214 partial_sink_.raw_size());
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 sink.WriteSnapshot(); 415 sink.WriteSnapshot();
411 sink.WritePartialSnapshot(); 416 sink.WritePartialSnapshot();
412 417
413 sink.WriteSpaceUsed( 418 sink.WriteSpaceUsed(
414 "context_", 419 "context_",
415 partial_ser.CurrentAllocationAddress(i::NEW_SPACE), 420 partial_ser.CurrentAllocationAddress(i::NEW_SPACE),
416 partial_ser.CurrentAllocationAddress(i::OLD_POINTER_SPACE), 421 partial_ser.CurrentAllocationAddress(i::OLD_POINTER_SPACE),
417 partial_ser.CurrentAllocationAddress(i::OLD_DATA_SPACE), 422 partial_ser.CurrentAllocationAddress(i::OLD_DATA_SPACE),
418 partial_ser.CurrentAllocationAddress(i::CODE_SPACE), 423 partial_ser.CurrentAllocationAddress(i::CODE_SPACE),
419 partial_ser.CurrentAllocationAddress(i::MAP_SPACE), 424 partial_ser.CurrentAllocationAddress(i::MAP_SPACE),
420 partial_ser.CurrentAllocationAddress(i::CELL_SPACE)); 425 partial_ser.CurrentAllocationAddress(i::CELL_SPACE),
426 partial_ser.CurrentAllocationAddress(i::PROPERTY_CELL_SPACE));
421 sink.WriteSpaceUsed( 427 sink.WriteSpaceUsed(
422 "", 428 "",
423 ser.CurrentAllocationAddress(i::NEW_SPACE), 429 ser.CurrentAllocationAddress(i::NEW_SPACE),
424 ser.CurrentAllocationAddress(i::OLD_POINTER_SPACE), 430 ser.CurrentAllocationAddress(i::OLD_POINTER_SPACE),
425 ser.CurrentAllocationAddress(i::OLD_DATA_SPACE), 431 ser.CurrentAllocationAddress(i::OLD_DATA_SPACE),
426 ser.CurrentAllocationAddress(i::CODE_SPACE), 432 ser.CurrentAllocationAddress(i::CODE_SPACE),
427 ser.CurrentAllocationAddress(i::MAP_SPACE), 433 ser.CurrentAllocationAddress(i::MAP_SPACE),
428 ser.CurrentAllocationAddress(i::CELL_SPACE)); 434 ser.CurrentAllocationAddress(i::CELL_SPACE),
435 ser.CurrentAllocationAddress(i::PROPERTY_CELL_SPACE));
429 return 0; 436 return 0;
430 } 437 }
OLDNEW
« no previous file with comments | « src/mark-compact.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698