| 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 IncrementStateCounter(state); | 269 IncrementStateCounter(state); |
| 270 ASSERT(IsPowerOf2(kBufferSize)); | 270 ASSERT(IsPowerOf2(kBufferSize)); |
| 271 current_index_ = (current_index_ + 1) & (kBufferSize - 1); | 271 current_index_ = (current_index_ + 1) & (kBufferSize - 1); |
| 272 } | 272 } |
| 273 | 273 |
| 274 | 274 |
| 275 // | 275 // |
| 276 // Profiler implementation. | 276 // Profiler implementation. |
| 277 // | 277 // |
| 278 Profiler::Profiler(Isolate* isolate) | 278 Profiler::Profiler(Isolate* isolate) |
| 279 : Thread(isolate), | 279 : Thread(isolate, "v8:Profiler"), |
| 280 head_(0), | 280 head_(0), |
| 281 tail_(0), | 281 tail_(0), |
| 282 overflow_(false), | 282 overflow_(false), |
| 283 buffer_semaphore_(OS::CreateSemaphore(0)), | 283 buffer_semaphore_(OS::CreateSemaphore(0)), |
| 284 engaged_(false), | 284 engaged_(false), |
| 285 running_(false), | 285 running_(false), |
| 286 paused_(false) { | 286 paused_(false) { |
| 287 } | 287 } |
| 288 | 288 |
| 289 | 289 |
| (...skipping 1367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1657 void SamplerRegistry::RemoveActiveSampler(Sampler* sampler) { | 1657 void SamplerRegistry::RemoveActiveSampler(Sampler* sampler) { |
| 1658 ASSERT(sampler->IsActive()); | 1658 ASSERT(sampler->IsActive()); |
| 1659 ScopedLock lock(mutex_); | 1659 ScopedLock lock(mutex_); |
| 1660 ASSERT(active_samplers_ != NULL); | 1660 ASSERT(active_samplers_ != NULL); |
| 1661 bool removed = active_samplers_->RemoveElement(sampler); | 1661 bool removed = active_samplers_->RemoveElement(sampler); |
| 1662 ASSERT(removed); | 1662 ASSERT(removed); |
| 1663 USE(removed); | 1663 USE(removed); |
| 1664 } | 1664 } |
| 1665 | 1665 |
| 1666 } } // namespace v8::internal | 1666 } } // namespace v8::internal |
| OLD | NEW |