OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 rate->Start(); | 462 rate->Start(); |
463 PerformGarbageCollection(collector, &tracer, collectionPolicy); | 463 PerformGarbageCollection(collector, &tracer, collectionPolicy); |
464 rate->Stop(); | 464 rate->Stop(); |
465 | 465 |
466 GarbageCollectionEpilogue(); | 466 GarbageCollectionEpilogue(); |
467 } | 467 } |
468 | 468 |
469 | 469 |
470 #ifdef ENABLE_LOGGING_AND_PROFILING | 470 #ifdef ENABLE_LOGGING_AND_PROFILING |
471 if (FLAG_log_gc) HeapProfiler::WriteSample(); | 471 if (FLAG_log_gc) HeapProfiler::WriteSample(); |
| 472 if (CpuProfiler::is_profiling()) CpuProfiler::RegisterMovedFunctions(); |
472 #endif | 473 #endif |
473 } | 474 } |
474 | 475 |
475 | 476 |
476 void Heap::PerformScavenge() { | 477 void Heap::PerformScavenge() { |
477 GCTracer tracer; | 478 GCTracer tracer; |
478 PerformGarbageCollection(SCAVENGER, &tracer, NORMAL); | 479 PerformGarbageCollection(SCAVENGER, &tracer, NORMAL); |
479 } | 480 } |
480 | 481 |
481 | 482 |
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1253 | 1254 |
1254 #if defined(DEBUG) || defined(ENABLE_LOGGING_AND_PROFILING) | 1255 #if defined(DEBUG) || defined(ENABLE_LOGGING_AND_PROFILING) |
1255 // Update NewSpace stats if necessary. | 1256 // Update NewSpace stats if necessary. |
1256 RecordCopiedObject(target); | 1257 RecordCopiedObject(target); |
1257 #endif | 1258 #endif |
1258 HEAP_PROFILE(ObjectMoveEvent(source->address(), target->address())); | 1259 HEAP_PROFILE(ObjectMoveEvent(source->address(), target->address())); |
1259 #if defined(ENABLE_LOGGING_AND_PROFILING) | 1260 #if defined(ENABLE_LOGGING_AND_PROFILING) |
1260 if (Logger::is_logging() || CpuProfiler::is_profiling()) { | 1261 if (Logger::is_logging() || CpuProfiler::is_profiling()) { |
1261 if (target->IsJSFunction()) { | 1262 if (target->IsJSFunction()) { |
1262 PROFILE(FunctionMoveEvent(source->address(), target->address())); | 1263 PROFILE(FunctionMoveEvent(source->address(), target->address())); |
1263 PROFILE(FunctionCreateEventFromMove(JSFunction::cast(target), source)); | 1264 PROFILE(FunctionCreateEventFromMove(JSFunction::cast(target))); |
1264 } | 1265 } |
1265 } | 1266 } |
1266 #endif | 1267 #endif |
1267 return target; | 1268 return target; |
1268 } | 1269 } |
1269 | 1270 |
1270 | 1271 |
1271 template<ObjectContents object_contents, SizeRestriction size_restriction> | 1272 template<ObjectContents object_contents, SizeRestriction size_restriction> |
1272 static inline void EvacuateObject(Map* map, | 1273 static inline void EvacuateObject(Map* map, |
1273 HeapObject** slot, | 1274 HeapObject** slot, |
(...skipping 3751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5025 void ExternalStringTable::TearDown() { | 5026 void ExternalStringTable::TearDown() { |
5026 new_space_strings_.Free(); | 5027 new_space_strings_.Free(); |
5027 old_space_strings_.Free(); | 5028 old_space_strings_.Free(); |
5028 } | 5029 } |
5029 | 5030 |
5030 | 5031 |
5031 List<Object*> ExternalStringTable::new_space_strings_; | 5032 List<Object*> ExternalStringTable::new_space_strings_; |
5032 List<Object*> ExternalStringTable::old_space_strings_; | 5033 List<Object*> ExternalStringTable::old_space_strings_; |
5033 | 5034 |
5034 } } // namespace v8::internal | 5035 } } // namespace v8::internal |
OLD | NEW |