| 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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 sampler_window[i] = NULL; | 395 sampler_window[i] = NULL; |
| 396 } | 396 } |
| 397 } | 397 } |
| 398 } | 398 } |
| 399 } | 399 } |
| 400 | 400 |
| 401 | 401 |
| 402 void RuntimeProfiler::RemoveDeadSamples() { | 402 void RuntimeProfiler::RemoveDeadSamples() { |
| 403 for (int i = 0; i < kSamplerWindowSize; i++) { | 403 for (int i = 0; i < kSamplerWindowSize; i++) { |
| 404 Object* function = sampler_window[i]; | 404 Object* function = sampler_window[i]; |
| 405 if (function != NULL && !Marking::IsMarked(HeapObject::cast(function))) { | 405 if (function != NULL && |
| 406 !Marking::MarkBitFrom(HeapObject::cast(function)).Get()) { |
| 406 sampler_window[i] = NULL; | 407 sampler_window[i] = NULL; |
| 407 } | 408 } |
| 408 } | 409 } |
| 409 } | 410 } |
| 410 | 411 |
| 411 | 412 |
| 412 void RuntimeProfiler::UpdateSamplesAfterCompact(ObjectVisitor* visitor) { | 413 void RuntimeProfiler::UpdateSamplesAfterCompact(ObjectVisitor* visitor) { |
| 413 for (int i = 0; i < kSamplerWindowSize; i++) { | 414 for (int i = 0; i < kSamplerWindowSize; i++) { |
| 414 visitor->VisitPointer(&sampler_window[i]); | 415 visitor->VisitPointer(&sampler_window[i]); |
| 415 } | 416 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 434 if (Top::WaitForJSState()) return true; | 435 if (Top::WaitForJSState()) return true; |
| 435 } | 436 } |
| 436 } | 437 } |
| 437 } | 438 } |
| 438 #endif | 439 #endif |
| 439 return false; | 440 return false; |
| 440 } | 441 } |
| 441 | 442 |
| 442 | 443 |
| 443 } } // namespace v8::internal | 444 } } // namespace v8::internal |
| OLD | NEW |