Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 438 #endif | 438 #endif |
| 439 | 439 |
| 440 isolate_->counters()->alive_after_last_gc()->Set( | 440 isolate_->counters()->alive_after_last_gc()->Set( |
| 441 static_cast<int>(SizeOfObjects())); | 441 static_cast<int>(SizeOfObjects())); |
| 442 | 442 |
| 443 isolate_->counters()->symbol_table_capacity()->Set( | 443 isolate_->counters()->symbol_table_capacity()->Set( |
| 444 symbol_table()->Capacity()); | 444 symbol_table()->Capacity()); |
| 445 isolate_->counters()->number_of_symbols()->Set( | 445 isolate_->counters()->number_of_symbols()->Set( |
| 446 symbol_table()->NumberOfElements()); | 446 symbol_table()->NumberOfElements()); |
| 447 | 447 |
| 448 isolate_->counters()->new_space_bytes_available()->Set( | 448 isolate_->counters()->new_space_bytes_available()->AddSample( |
| 449 static_cast<int>(new_space()->Available())); | 449 static_cast<int>(new_space()->Available()) / 1024); |
|
Michael Starzinger
2012/07/02 21:09:56
Better use the "KB" macro here. And on the followi
| |
| 450 isolate_->counters()->new_space_bytes_committed()->Set( | 450 isolate_->counters()->new_space_bytes_committed()->AddSample( |
| 451 static_cast<int>(new_space()->CommittedMemory())); | 451 static_cast<int>(new_space()->CommittedMemory()) / 1024); |
| 452 isolate_->counters()->new_space_bytes_used()->Set( | 452 isolate_->counters()->new_space_bytes_used()->AddSample( |
| 453 static_cast<int>(new_space()->SizeOfObjects())); | 453 static_cast<int>(new_space()->SizeOfObjects()) / 1024); |
| 454 | 454 |
| 455 isolate_->counters()->old_pointer_space_bytes_available()->Set( | 455 isolate_->counters()->old_pointer_space_bytes_available()->AddSample( |
| 456 static_cast<int>(old_pointer_space()->Available())); | 456 static_cast<int>(old_pointer_space()->Available()) / 1024); |
| 457 isolate_->counters()->old_pointer_space_bytes_committed()->Set( | 457 isolate_->counters()->old_pointer_space_bytes_committed()->AddSample( |
| 458 static_cast<int>(old_pointer_space()->CommittedMemory())); | 458 static_cast<int>(old_pointer_space()->CommittedMemory()) / 1024); |
| 459 isolate_->counters()->old_pointer_space_bytes_used()->Set( | 459 isolate_->counters()->old_pointer_space_bytes_used()->AddSample( |
| 460 static_cast<int>(old_pointer_space()->SizeOfObjects())); | 460 static_cast<int>(old_pointer_space()->SizeOfObjects()) / 1024); |
| 461 | 461 |
| 462 isolate_->counters()->old_data_space_bytes_available()->Set( | 462 isolate_->counters()->old_data_space_bytes_available()->AddSample( |
| 463 static_cast<int>(old_data_space()->Available())); | 463 static_cast<int>(old_data_space()->Available()) / 1024); |
| 464 isolate_->counters()->old_data_space_bytes_committed()->Set( | 464 isolate_->counters()->old_data_space_bytes_committed()->AddSample( |
| 465 static_cast<int>(old_data_space()->CommittedMemory())); | 465 static_cast<int>(old_data_space()->CommittedMemory()) / 1024); |
| 466 isolate_->counters()->old_data_space_bytes_used()->Set( | 466 isolate_->counters()->old_data_space_bytes_used()->AddSample( |
| 467 static_cast<int>(old_data_space()->SizeOfObjects())); | 467 static_cast<int>(old_data_space()->SizeOfObjects()) / 1024); |
| 468 | 468 |
| 469 isolate_->counters()->code_space_bytes_available()->Set( | 469 isolate_->counters()->code_space_bytes_available()->AddSample( |
| 470 static_cast<int>(code_space()->Available())); | 470 static_cast<int>(code_space()->Available()) / 1024); |
| 471 isolate_->counters()->code_space_bytes_committed()->Set( | 471 isolate_->counters()->code_space_bytes_committed()->AddSample( |
| 472 static_cast<int>(code_space()->CommittedMemory())); | 472 static_cast<int>(code_space()->CommittedMemory()) / 1024); |
| 473 isolate_->counters()->code_space_bytes_used()->Set( | 473 isolate_->counters()->code_space_bytes_used()->AddSample( |
| 474 static_cast<int>(code_space()->SizeOfObjects())); | 474 static_cast<int>(code_space()->SizeOfObjects()) / 1024); |
| 475 | 475 |
| 476 isolate_->counters()->map_space_bytes_available()->Set( | 476 isolate_->counters()->map_space_bytes_available()->AddSample( |
| 477 static_cast<int>(map_space()->Available())); | 477 static_cast<int>(map_space()->Available()) / 1024); |
| 478 isolate_->counters()->map_space_bytes_committed()->Set( | 478 isolate_->counters()->map_space_bytes_committed()->AddSample( |
| 479 static_cast<int>(map_space()->CommittedMemory())); | 479 static_cast<int>(map_space()->CommittedMemory()) / 1024); |
| 480 isolate_->counters()->map_space_bytes_used()->Set( | 480 isolate_->counters()->map_space_bytes_used()->AddSample( |
| 481 static_cast<int>(map_space()->SizeOfObjects())); | 481 static_cast<int>(map_space()->SizeOfObjects()) / 1024); |
| 482 | 482 |
| 483 isolate_->counters()->cell_space_bytes_available()->Set( | 483 isolate_->counters()->cell_space_bytes_available()->AddSample( |
| 484 static_cast<int>(cell_space()->Available())); | 484 static_cast<int>(cell_space()->Available()) / 1024); |
| 485 isolate_->counters()->cell_space_bytes_committed()->Set( | 485 isolate_->counters()->cell_space_bytes_committed()->AddSample( |
| 486 static_cast<int>(cell_space()->CommittedMemory())); | 486 static_cast<int>(cell_space()->CommittedMemory()) / 1024); |
| 487 isolate_->counters()->cell_space_bytes_used()->Set( | 487 isolate_->counters()->cell_space_bytes_used()->AddSample( |
| 488 static_cast<int>(cell_space()->SizeOfObjects())); | 488 static_cast<int>(cell_space()->SizeOfObjects()) / 1024); |
| 489 | 489 |
| 490 isolate_->counters()->lo_space_bytes_available()->Set( | 490 isolate_->counters()->lo_space_bytes_available()->AddSample( |
| 491 static_cast<int>(lo_space()->Available())); | 491 static_cast<int>(lo_space()->Available()) / 1024); |
| 492 isolate_->counters()->lo_space_bytes_committed()->Set( | 492 isolate_->counters()->lo_space_bytes_committed()->AddSample( |
| 493 static_cast<int>(lo_space()->CommittedMemory())); | 493 static_cast<int>(lo_space()->CommittedMemory()) / 1024); |
| 494 isolate_->counters()->lo_space_bytes_used()->Set( | 494 isolate_->counters()->lo_space_bytes_used()->AddSample( |
| 495 static_cast<int>(lo_space()->SizeOfObjects())); | 495 static_cast<int>(lo_space()->SizeOfObjects()) / 1024); |
| 496 | 496 |
| 497 #if defined(DEBUG) | 497 #if defined(DEBUG) |
| 498 ReportStatisticsAfterGC(); | 498 ReportStatisticsAfterGC(); |
| 499 #endif // DEBUG | 499 #endif // DEBUG |
| 500 #ifdef ENABLE_DEBUGGER_SUPPORT | 500 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 501 isolate_->debug()->AfterGarbageCollection(); | 501 isolate_->debug()->AfterGarbageCollection(); |
| 502 #endif // ENABLE_DEBUGGER_SUPPORT | 502 #endif // ENABLE_DEBUGGER_SUPPORT |
| 503 } | 503 } |
| 504 | 504 |
| 505 | 505 |
| (...skipping 6715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7221 } else { | 7221 } else { |
| 7222 p ^= 0x1d1ed & (Page::kPageSize - 1); // I died. | 7222 p ^= 0x1d1ed & (Page::kPageSize - 1); // I died. |
| 7223 } | 7223 } |
| 7224 remembered_unmapped_pages_[remembered_unmapped_pages_index_] = | 7224 remembered_unmapped_pages_[remembered_unmapped_pages_index_] = |
| 7225 reinterpret_cast<Address>(p); | 7225 reinterpret_cast<Address>(p); |
| 7226 remembered_unmapped_pages_index_++; | 7226 remembered_unmapped_pages_index_++; |
| 7227 remembered_unmapped_pages_index_ %= kRememberedUnmappedPages; | 7227 remembered_unmapped_pages_index_ %= kRememberedUnmappedPages; |
| 7228 } | 7228 } |
| 7229 | 7229 |
| 7230 } } // namespace v8::internal | 7230 } } // namespace v8::internal |
| OLD | NEW |