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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 events_buffer_.Enqueue(evt_rec); | 180 events_buffer_.Enqueue(evt_rec); |
181 } | 181 } |
182 | 182 |
183 | 183 |
184 void ProfilerEventsProcessor::AddCurrentStack() { | 184 void ProfilerEventsProcessor::AddCurrentStack() { |
185 TickSampleEventRecord record; | 185 TickSampleEventRecord record; |
186 TickSample* sample = &record.sample; | 186 TickSample* sample = &record.sample; |
187 sample->state = Isolate::Current()->current_vm_state(); | 187 sample->state = Isolate::Current()->current_vm_state(); |
188 sample->pc = reinterpret_cast<Address>(sample); // Not NULL. | 188 sample->pc = reinterpret_cast<Address>(sample); // Not NULL. |
189 sample->tos = NULL; | 189 sample->tos = NULL; |
| 190 sample->has_external_callback = false; |
190 sample->frames_count = 0; | 191 sample->frames_count = 0; |
191 for (StackTraceFrameIterator it; | 192 for (StackTraceFrameIterator it; |
192 !it.done() && sample->frames_count < TickSample::kMaxFramesCount; | 193 !it.done() && sample->frames_count < TickSample::kMaxFramesCount; |
193 it.Advance()) { | 194 it.Advance()) { |
194 sample->stack[sample->frames_count++] = it.frame()->pc(); | 195 sample->stack[sample->frames_count++] = it.frame()->pc(); |
195 } | 196 } |
196 record.order = enqueue_order_; | 197 record.order = enqueue_order_; |
197 ticks_from_vm_buffer_.Enqueue(record); | 198 ticks_from_vm_buffer_.Enqueue(record); |
198 } | 199 } |
199 | 200 |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 #ifdef ENABLE_LOGGING_AND_PROFILING | 596 #ifdef ENABLE_LOGGING_AND_PROFILING |
596 Isolate* isolate = Isolate::Current(); | 597 Isolate* isolate = Isolate::Current(); |
597 if (isolate->cpu_profiler() != NULL) { | 598 if (isolate->cpu_profiler() != NULL) { |
598 delete isolate->cpu_profiler(); | 599 delete isolate->cpu_profiler(); |
599 } | 600 } |
600 isolate->set_cpu_profiler(NULL); | 601 isolate->set_cpu_profiler(NULL); |
601 #endif | 602 #endif |
602 } | 603 } |
603 | 604 |
604 } } // namespace v8::internal | 605 } } // namespace v8::internal |
OLD | NEW |