Revision f230a1cf deps/v8/src/cpu-profiler.cc
deps/v8/src/cpu-profiler.cc | ||
---|---|---|
64 | 64 |
|
65 | 65 |
void ProfilerEventsProcessor::AddCurrentStack(Isolate* isolate) { |
66 | 66 |
TickSampleEventRecord record(last_code_event_id_); |
67 |
TickSample* sample = &record.sample;
|
|
68 |
sample->state = isolate->current_vm_state();
|
|
69 |
sample->pc = reinterpret_cast<Address>(sample); // Not NULL.
|
|
70 |
for (StackTraceFrameIterator it(isolate);
|
|
71 |
!it.done() && sample->frames_count < TickSample::kMaxFramesCount;
|
|
72 |
it.Advance()) {
|
|
73 |
sample->stack[sample->frames_count++] = it.frame()->pc();
|
|
67 |
RegisterState regs;
|
|
68 |
StackFrameIterator it(isolate);
|
|
69 |
if (!it.done()) {
|
|
70 |
StackFrame* frame = it.frame();
|
|
71 |
regs.sp = frame->sp();
|
|
72 |
regs.fp = frame->fp();
|
|
73 |
regs.pc = frame->pc();
|
|
74 | 74 |
} |
75 |
record.sample.Init(isolate, regs); |
|
75 | 76 |
ticks_from_vm_buffer_.Enqueue(record); |
76 | 77 |
} |
77 | 78 |
|
... | ... | |
260 | 261 |
Code* code, |
261 | 262 |
SharedFunctionInfo* shared, |
262 | 263 |
CompilationInfo* info, |
263 |
Name* source, int line) { |
|
264 |
Name* source, int line, int column) {
|
|
264 | 265 |
if (FilterOutCodeCreateEvent(tag)) return; |
265 | 266 |
CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION); |
266 | 267 |
CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; |
... | ... | |
270 | 271 |
profiles_->GetFunctionName(shared->DebugName()), |
271 | 272 |
CodeEntry::kEmptyNamePrefix, |
272 | 273 |
profiles_->GetName(source), |
273 |
line); |
|
274 |
line, |
|
275 |
column); |
|
274 | 276 |
if (info) { |
275 | 277 |
rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges()); |
276 | 278 |
} |
... | ... | |
435 | 437 |
logger->is_logging_ = false; |
436 | 438 |
generator_ = new ProfileGenerator(profiles_); |
437 | 439 |
Sampler* sampler = logger->sampler(); |
440 |
#if V8_CC_MSVC && (_MSC_VER >= 1800) |
|
441 |
// VS2013 reports "warning C4316: 'v8::internal::ProfilerEventsProcessor' |
|
442 |
// : object allocated on the heap may not be aligned 64". We need to |
|
443 |
// figure out if this is a legitimate warning or a compiler bug. |
|
444 |
#pragma warning(push) |
|
445 |
#pragma warning(disable:4316) |
|
446 |
#endif |
|
438 | 447 |
processor_ = new ProfilerEventsProcessor( |
439 | 448 |
generator_, sampler, sampling_interval_); |
449 |
#if V8_CC_MSVC && (_MSC_VER >= 1800) |
|
450 |
#pragma warning(pop) |
|
451 |
#endif |
|
440 | 452 |
is_profiling_ = true; |
441 | 453 |
// Enumerate stuff we already have in the heap. |
442 | 454 |
ASSERT(isolate_->heap()->HasBeenSetUp()); |
Also available in: Unified diff