| 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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 intptr_t Heap::SizeOfObjects() { | 460 intptr_t Heap::SizeOfObjects() { |
| 461 intptr_t total = 0; | 461 intptr_t total = 0; |
| 462 AllSpaces spaces(this); | 462 AllSpaces spaces(this); |
| 463 for (Space* space = spaces.next(); space != NULL; space = spaces.next()) { | 463 for (Space* space = spaces.next(); space != NULL; space = spaces.next()) { |
| 464 total += space->SizeOfObjects(); | 464 total += space->SizeOfObjects(); |
| 465 } | 465 } |
| 466 return total; | 466 return total; |
| 467 } | 467 } |
| 468 | 468 |
| 469 | 469 |
| 470 void Heap::ClearAllICsByKind(Code::Kind kind) { |
| 471 HeapObjectIterator it(code_space()); |
| 472 |
| 473 for (Object* object = it.Next(); object != NULL; object = it.Next()) { |
| 474 Code* code = Code::cast(object); |
| 475 Code::Kind current_kind = code->kind(); |
| 476 if (current_kind == Code::FUNCTION || |
| 477 current_kind == Code::OPTIMIZED_FUNCTION) { |
| 478 code->ClearInlineCaches(kind); |
| 479 } |
| 480 } |
| 481 } |
| 482 |
| 483 |
| 470 void Heap::RepairFreeListsAfterBoot() { | 484 void Heap::RepairFreeListsAfterBoot() { |
| 471 PagedSpaces spaces(this); | 485 PagedSpaces spaces(this); |
| 472 for (PagedSpace* space = spaces.next(); | 486 for (PagedSpace* space = spaces.next(); |
| 473 space != NULL; | 487 space != NULL; |
| 474 space = spaces.next()) { | 488 space = spaces.next()) { |
| 475 space->RepairFreeListsAfterBoot(); | 489 space->RepairFreeListsAfterBoot(); |
| 476 } | 490 } |
| 477 } | 491 } |
| 478 | 492 |
| 479 | 493 |
| (...skipping 7487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7967 if (FLAG_concurrent_recompilation) { | 7981 if (FLAG_concurrent_recompilation) { |
| 7968 heap_->relocation_mutex_->Lock(); | 7982 heap_->relocation_mutex_->Lock(); |
| 7969 #ifdef DEBUG | 7983 #ifdef DEBUG |
| 7970 heap_->relocation_mutex_locked_by_optimizer_thread_ = | 7984 heap_->relocation_mutex_locked_by_optimizer_thread_ = |
| 7971 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); | 7985 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); |
| 7972 #endif // DEBUG | 7986 #endif // DEBUG |
| 7973 } | 7987 } |
| 7974 } | 7988 } |
| 7975 | 7989 |
| 7976 } } // namespace v8::internal | 7990 } } // namespace v8::internal |
| OLD | NEW |