Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: src/sampler.cc

Issue 18269003: Correctly report stack trace when current function is FunctionApply builtin (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix test Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/sampler.h ('k') | test/cctest/test-cpu-profiler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 external_callback = callback; 630 external_callback = callback;
631 has_external_callback = true; 631 has_external_callback = true;
632 } else { 632 } else {
633 // Sample potential return address value for frameless invocation of 633 // Sample potential return address value for frameless invocation of
634 // stubs (we'll figure out later, if this value makes sense). 634 // stubs (we'll figure out later, if this value makes sense).
635 tos = Memory::Address_at(sp); 635 tos = Memory::Address_at(sp);
636 has_external_callback = false; 636 has_external_callback = false;
637 } 637 }
638 638
639 SafeStackFrameIterator it(isolate, fp, sp, sp, js_entry_sp); 639 SafeStackFrameIterator it(isolate, fp, sp, sp, js_entry_sp);
640 top_frame_type = it.top_frame_type();
640 int i = 0; 641 int i = 0;
641 while (!it.done() && i < TickSample::kMaxFramesCount) { 642 while (!it.done() && i < TickSample::kMaxFramesCount) {
642 stack[i++] = it.frame()->pc(); 643 stack[i++] = it.frame()->pc();
643 it.Advance(); 644 it.Advance();
644 } 645 }
645 frames_count = i; 646 frames_count = i;
646 } 647 }
647 648
648 649
649 void Sampler::SetUp() { 650 void Sampler::SetUp() {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 SamplerThread::RemoveActiveSampler(this); 684 SamplerThread::RemoveActiveSampler(this);
684 SetActive(false); 685 SetActive(false);
685 } 686 }
686 687
687 void Sampler::SampleStack(TickSample* sample) { 688 void Sampler::SampleStack(TickSample* sample) {
688 sample->Trace(isolate_); 689 sample->Trace(isolate_);
689 if (++samples_taken_ < 0) samples_taken_ = 0; 690 if (++samples_taken_ < 0) samples_taken_ = 0;
690 } 691 }
691 692
692 } } // namespace v8::internal 693 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/sampler.h ('k') | test/cctest/test-cpu-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698