OLD | NEW |
1 // Copyright 2011 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 |
11 // with the distribution. | 11 // with the distribution. |
(...skipping 1987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1999 ResumeThread(profiled_thread); | 1999 ResumeThread(profiled_thread); |
2000 } | 2000 } |
2001 | 2001 |
2002 const int interval_; | 2002 const int interval_; |
2003 RuntimeProfilerRateLimiter rate_limiter_; | 2003 RuntimeProfilerRateLimiter rate_limiter_; |
2004 | 2004 |
2005 // Protects the process wide state below. | 2005 // Protects the process wide state below. |
2006 static Mutex* mutex_; | 2006 static Mutex* mutex_; |
2007 static SamplerThread* instance_; | 2007 static SamplerThread* instance_; |
2008 | 2008 |
| 2009 private: |
2009 DISALLOW_COPY_AND_ASSIGN(SamplerThread); | 2010 DISALLOW_COPY_AND_ASSIGN(SamplerThread); |
2010 }; | 2011 }; |
2011 | 2012 |
2012 | 2013 |
2013 Mutex* SamplerThread::mutex_ = OS::CreateMutex(); | 2014 Mutex* SamplerThread::mutex_ = OS::CreateMutex(); |
2014 SamplerThread* SamplerThread::instance_ = NULL; | 2015 SamplerThread* SamplerThread::instance_ = NULL; |
2015 | 2016 |
2016 | 2017 |
2017 Sampler::Sampler(Isolate* isolate, int interval) | 2018 Sampler::Sampler(Isolate* isolate, int interval) |
2018 : isolate_(isolate), | 2019 : isolate_(isolate), |
(...skipping 19 matching lines...) Expand all Loading... |
2038 | 2039 |
2039 | 2040 |
2040 void Sampler::Stop() { | 2041 void Sampler::Stop() { |
2041 ASSERT(IsActive()); | 2042 ASSERT(IsActive()); |
2042 SamplerThread::RemoveActiveSampler(this); | 2043 SamplerThread::RemoveActiveSampler(this); |
2043 SetActive(false); | 2044 SetActive(false); |
2044 } | 2045 } |
2045 | 2046 |
2046 | 2047 |
2047 } } // namespace v8::internal | 2048 } } // namespace v8::internal |
OLD | NEW |