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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 intptr_t Heap::SizeOfObjects() { | 473 intptr_t Heap::SizeOfObjects() { |
474 intptr_t total = 0; | 474 intptr_t total = 0; |
475 AllSpaces spaces(this); | 475 AllSpaces spaces(this); |
476 for (Space* space = spaces.next(); space != NULL; space = spaces.next()) { | 476 for (Space* space = spaces.next(); space != NULL; space = spaces.next()) { |
477 total += space->SizeOfObjects(); | 477 total += space->SizeOfObjects(); |
478 } | 478 } |
479 return total; | 479 return total; |
480 } | 480 } |
481 | 481 |
482 | 482 |
| 483 void Heap::ClearAllICsByKind(Code::Kind kind) { |
| 484 HeapObjectIterator it(code_space()); |
| 485 |
| 486 for (Object* object = it.Next(); object != NULL; object = it.Next()) { |
| 487 Code* code = Code::cast(object); |
| 488 Code::Kind current_kind = code->kind(); |
| 489 if (current_kind == Code::FUNCTION || |
| 490 current_kind == Code::OPTIMIZED_FUNCTION) { |
| 491 code->ClearInlineCaches(kind); |
| 492 } |
| 493 } |
| 494 } |
| 495 |
| 496 |
483 void Heap::RepairFreeListsAfterBoot() { | 497 void Heap::RepairFreeListsAfterBoot() { |
484 PagedSpaces spaces(this); | 498 PagedSpaces spaces(this); |
485 for (PagedSpace* space = spaces.next(); | 499 for (PagedSpace* space = spaces.next(); |
486 space != NULL; | 500 space != NULL; |
487 space = spaces.next()) { | 501 space = spaces.next()) { |
488 space->RepairFreeListsAfterBoot(); | 502 space->RepairFreeListsAfterBoot(); |
489 } | 503 } |
490 } | 504 } |
491 | 505 |
492 | 506 |
(...skipping 7411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7904 if (FLAG_concurrent_recompilation) { | 7918 if (FLAG_concurrent_recompilation) { |
7905 heap_->relocation_mutex_->Lock(); | 7919 heap_->relocation_mutex_->Lock(); |
7906 #ifdef DEBUG | 7920 #ifdef DEBUG |
7907 heap_->relocation_mutex_locked_by_optimizer_thread_ = | 7921 heap_->relocation_mutex_locked_by_optimizer_thread_ = |
7908 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); | 7922 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); |
7909 #endif // DEBUG | 7923 #endif // DEBUG |
7910 } | 7924 } |
7911 } | 7925 } |
7912 | 7926 |
7913 } } // namespace v8::internal | 7927 } } // namespace v8::internal |
OLD | NEW |