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

Side by Side Diff: src/spaces.cc

Issue 844006: Merge changes up to V8 version 2.1.3 into the partial snapshots (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/partial_snapshots/
Patch Set: Created 10 years, 9 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/serialize.cc ('k') | src/splay-tree.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 1361 matching lines...) Expand 10 before | Expand all | Expand 10 after
1372 for (int i = 0; i < Code::NUMBER_OF_KINDS; i++) { 1372 for (int i = 0; i < Code::NUMBER_OF_KINDS; i++) {
1373 switch (static_cast<Code::Kind>(i)) { 1373 switch (static_cast<Code::Kind>(i)) {
1374 CASE(FUNCTION); 1374 CASE(FUNCTION);
1375 CASE(STUB); 1375 CASE(STUB);
1376 CASE(BUILTIN); 1376 CASE(BUILTIN);
1377 CASE(LOAD_IC); 1377 CASE(LOAD_IC);
1378 CASE(KEYED_LOAD_IC); 1378 CASE(KEYED_LOAD_IC);
1379 CASE(STORE_IC); 1379 CASE(STORE_IC);
1380 CASE(KEYED_STORE_IC); 1380 CASE(KEYED_STORE_IC);
1381 CASE(CALL_IC); 1381 CASE(CALL_IC);
1382 CASE(BINARY_OP_IC);
1382 } 1383 }
1383 } 1384 }
1384 1385
1385 #undef CASE 1386 #undef CASE
1386 1387
1387 PrintF("\n Code kind histograms: \n"); 1388 PrintF("\n Code kind histograms: \n");
1388 for (int i = 0; i < Code::NUMBER_OF_KINDS; i++) { 1389 for (int i = 0; i < Code::NUMBER_OF_KINDS; i++) {
1389 if (code_kind_statistics[i] > 0) { 1390 if (code_kind_statistics[i] > 0) {
1390 PrintF(" %-20s: %10d bytes\n", table[i], code_kind_statistics[i]); 1391 PrintF(" %-20s: %10d bytes\n", table[i], code_kind_statistics[i]);
1391 } 1392 }
(...skipping 14 matching lines...) Expand all
1406 } 1407 }
1407 1408
1408 return obj->Size(); 1409 return obj->Size();
1409 } 1410 }
1410 1411
1411 1412
1412 static void ReportHistogram(bool print_spill) { 1413 static void ReportHistogram(bool print_spill) {
1413 PrintF("\n Object Histogram:\n"); 1414 PrintF("\n Object Histogram:\n");
1414 for (int i = 0; i <= LAST_TYPE; i++) { 1415 for (int i = 0; i <= LAST_TYPE; i++) {
1415 if (heap_histograms[i].number() > 0) { 1416 if (heap_histograms[i].number() > 0) {
1416 PrintF(" %-33s%10d (%10d bytes)\n", 1417 PrintF(" %-34s%10d (%10d bytes)\n",
1417 heap_histograms[i].name(), 1418 heap_histograms[i].name(),
1418 heap_histograms[i].number(), 1419 heap_histograms[i].number(),
1419 heap_histograms[i].bytes()); 1420 heap_histograms[i].bytes());
1420 } 1421 }
1421 } 1422 }
1422 PrintF("\n"); 1423 PrintF("\n");
1423 1424
1424 // Summarize string types. 1425 // Summarize string types.
1425 int string_number = 0; 1426 int string_number = 0;
1426 int string_bytes = 0; 1427 int string_bytes = 0;
1427 #define INCREMENT(type, size, name, camel_name) \ 1428 #define INCREMENT(type, size, name, camel_name) \
1428 string_number += heap_histograms[type].number(); \ 1429 string_number += heap_histograms[type].number(); \
1429 string_bytes += heap_histograms[type].bytes(); 1430 string_bytes += heap_histograms[type].bytes();
1430 STRING_TYPE_LIST(INCREMENT) 1431 STRING_TYPE_LIST(INCREMENT)
1431 #undef INCREMENT 1432 #undef INCREMENT
1432 if (string_number > 0) { 1433 if (string_number > 0) {
1433 PrintF(" %-33s%10d (%10d bytes)\n\n", "STRING_TYPE", string_number, 1434 PrintF(" %-34s%10d (%10d bytes)\n\n", "STRING_TYPE", string_number,
1434 string_bytes); 1435 string_bytes);
1435 } 1436 }
1436 1437
1437 if (FLAG_collect_heap_spill_statistics && print_spill) { 1438 if (FLAG_collect_heap_spill_statistics && print_spill) {
1438 js_spill_information.Print(); 1439 js_spill_information.Print();
1439 } 1440 }
1440 } 1441 }
1441 #endif // DEBUG 1442 #endif // DEBUG
1442 1443
1443 1444
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
1492 1493
1493 void NewSpace::ReportStatistics() { 1494 void NewSpace::ReportStatistics() {
1494 #ifdef DEBUG 1495 #ifdef DEBUG
1495 if (FLAG_heap_stats) { 1496 if (FLAG_heap_stats) {
1496 float pct = static_cast<float>(Available()) / Capacity(); 1497 float pct = static_cast<float>(Available()) / Capacity();
1497 PrintF(" capacity: %d, available: %d, %%%d\n", 1498 PrintF(" capacity: %d, available: %d, %%%d\n",
1498 Capacity(), Available(), static_cast<int>(pct*100)); 1499 Capacity(), Available(), static_cast<int>(pct*100));
1499 PrintF("\n Object Histogram:\n"); 1500 PrintF("\n Object Histogram:\n");
1500 for (int i = 0; i <= LAST_TYPE; i++) { 1501 for (int i = 0; i <= LAST_TYPE; i++) {
1501 if (allocated_histogram_[i].number() > 0) { 1502 if (allocated_histogram_[i].number() > 0) {
1502 PrintF(" %-33s%10d (%10d bytes)\n", 1503 PrintF(" %-34s%10d (%10d bytes)\n",
1503 allocated_histogram_[i].name(), 1504 allocated_histogram_[i].name(),
1504 allocated_histogram_[i].number(), 1505 allocated_histogram_[i].number(),
1505 allocated_histogram_[i].bytes()); 1506 allocated_histogram_[i].bytes());
1506 } 1507 }
1507 } 1508 }
1508 PrintF("\n"); 1509 PrintF("\n");
1509 } 1510 }
1510 #endif // DEBUG 1511 #endif // DEBUG
1511 1512
1512 #ifdef ENABLE_LOGGING_AND_PROFILING 1513 #ifdef ENABLE_LOGGING_AND_PROFILING
(...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after
2869 reinterpret_cast<Object**>(object->address() 2870 reinterpret_cast<Object**>(object->address()
2870 + Page::kObjectAreaSize), 2871 + Page::kObjectAreaSize),
2871 allocation_top); 2872 allocation_top);
2872 PrintF("\n"); 2873 PrintF("\n");
2873 } 2874 }
2874 } 2875 }
2875 } 2876 }
2876 #endif // DEBUG 2877 #endif // DEBUG
2877 2878
2878 } } // namespace v8::internal 2879 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/serialize.cc ('k') | src/splay-tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698