OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 #endif | 276 #endif |
277 | 277 |
278 Counters::alive_after_last_gc.Set(SizeOfObjects()); | 278 Counters::alive_after_last_gc.Set(SizeOfObjects()); |
279 | 279 |
280 SymbolTable* symbol_table = SymbolTable::cast(Heap::symbol_table_); | 280 SymbolTable* symbol_table = SymbolTable::cast(Heap::symbol_table_); |
281 Counters::symbol_table_capacity.Set(symbol_table->Capacity()); | 281 Counters::symbol_table_capacity.Set(symbol_table->Capacity()); |
282 Counters::number_of_symbols.Set(symbol_table->NumberOfElements()); | 282 Counters::number_of_symbols.Set(symbol_table->NumberOfElements()); |
283 #if defined(DEBUG) || defined(ENABLE_LOGGING_AND_PROFILING) | 283 #if defined(DEBUG) || defined(ENABLE_LOGGING_AND_PROFILING) |
284 ReportStatisticsAfterGC(); | 284 ReportStatisticsAfterGC(); |
285 #endif | 285 #endif |
| 286 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 287 Debug::AfterGarbageCollection(); |
| 288 #endif |
286 } | 289 } |
287 | 290 |
288 | 291 |
289 void Heap::CollectAllGarbage() { | 292 void Heap::CollectAllGarbage() { |
290 // Since we are ignoring the return value, the exact choice of space does | 293 // Since we are ignoring the return value, the exact choice of space does |
291 // not matter, so long as we do not specify NEW_SPACE, which would not | 294 // not matter, so long as we do not specify NEW_SPACE, which would not |
292 // cause a full GC. | 295 // cause a full GC. |
293 CollectGarbage(0, OLD_POINTER_SPACE); | 296 CollectGarbage(0, OLD_POINTER_SPACE); |
294 } | 297 } |
295 | 298 |
(...skipping 3135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3431 #ifdef DEBUG | 3434 #ifdef DEBUG |
3432 bool Heap::GarbageCollectionGreedyCheck() { | 3435 bool Heap::GarbageCollectionGreedyCheck() { |
3433 ASSERT(FLAG_gc_greedy); | 3436 ASSERT(FLAG_gc_greedy); |
3434 if (Bootstrapper::IsActive()) return true; | 3437 if (Bootstrapper::IsActive()) return true; |
3435 if (disallow_allocation_failure()) return true; | 3438 if (disallow_allocation_failure()) return true; |
3436 return CollectGarbage(0, NEW_SPACE); | 3439 return CollectGarbage(0, NEW_SPACE); |
3437 } | 3440 } |
3438 #endif | 3441 #endif |
3439 | 3442 |
3440 } } // namespace v8::internal | 3443 } } // namespace v8::internal |
OLD | NEW |