| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 bool paused_; | 142 bool paused_; |
| 143 }; | 143 }; |
| 144 | 144 |
| 145 | 145 |
| 146 // | 146 // |
| 147 // StackTracer implementation | 147 // StackTracer implementation |
| 148 // | 148 // |
| 149 void StackTracer::Trace(Isolate* isolate, TickSample* sample) { | 149 void StackTracer::Trace(Isolate* isolate, TickSample* sample) { |
| 150 ASSERT(isolate->IsInitialized()); | 150 ASSERT(isolate->IsInitialized()); |
| 151 | 151 |
| 152 sample->tos = NULL; | |
| 153 sample->frames_count = 0; | |
| 154 sample->has_external_callback = false; | |
| 155 | |
| 156 // Avoid collecting traces while doing GC. | 152 // Avoid collecting traces while doing GC. |
| 157 if (sample->state == GC) return; | 153 if (sample->state == GC) return; |
| 158 | 154 |
| 159 const Address js_entry_sp = | 155 const Address js_entry_sp = |
| 160 Isolate::js_entry_sp(isolate->thread_local_top()); | 156 Isolate::js_entry_sp(isolate->thread_local_top()); |
| 161 if (js_entry_sp == 0) { | 157 if (js_entry_sp == 0) { |
| 162 // Not executing JS now. | 158 // Not executing JS now. |
| 163 return; | 159 return; |
| 164 } | 160 } |
| 165 | 161 |
| (...skipping 1829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1995 void SamplerRegistry::RemoveActiveSampler(Sampler* sampler) { | 1991 void SamplerRegistry::RemoveActiveSampler(Sampler* sampler) { |
| 1996 ASSERT(sampler->IsActive()); | 1992 ASSERT(sampler->IsActive()); |
| 1997 ScopedLock lock(mutex_); | 1993 ScopedLock lock(mutex_); |
| 1998 ASSERT(active_samplers_ != NULL); | 1994 ASSERT(active_samplers_ != NULL); |
| 1999 bool removed = active_samplers_->RemoveElement(sampler); | 1995 bool removed = active_samplers_->RemoveElement(sampler); |
| 2000 ASSERT(removed); | 1996 ASSERT(removed); |
| 2001 USE(removed); | 1997 USE(removed); |
| 2002 } | 1998 } |
| 2003 | 1999 |
| 2004 } } // namespace v8::internal | 2000 } } // namespace v8::internal |
| OLD | NEW |