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

Side by Side Diff: src/platform-linux.cc

Issue 147150: Reimplement profiler sampler on Mac OS X to get it working under Chromium. (Closed)
Patch Set: moved thread resuming and got rid of thread_suspended flag Created 11 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
« no previous file with comments | « src/platform-freebsd.cc ('k') | src/platform-macos.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 #if (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3)) 632 #if (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3))
633 sample.pc = mcontext.gregs[R15]; 633 sample.pc = mcontext.gregs[R15];
634 sample.sp = mcontext.gregs[R13]; 634 sample.sp = mcontext.gregs[R13];
635 sample.fp = mcontext.gregs[R11]; 635 sample.fp = mcontext.gregs[R11];
636 #else 636 #else
637 sample.pc = mcontext.arm_pc; 637 sample.pc = mcontext.arm_pc;
638 sample.sp = mcontext.arm_sp; 638 sample.sp = mcontext.arm_sp;
639 sample.fp = mcontext.arm_fp; 639 sample.fp = mcontext.arm_fp;
640 #endif 640 #endif
641 #endif 641 #endif
642 active_sampler_->SampleStack(&sample);
642 } 643 }
643 644
644 // We always sample the VM state. 645 // We always sample the VM state.
645 sample.state = Logger::state(); 646 sample.state = Logger::state();
646 647
647 active_sampler_->Tick(&sample); 648 active_sampler_->Tick(&sample);
648 } 649 }
649 650
650 651
651 class Sampler::PlatformData : public Malloced { 652 class Sampler::PlatformData : public Malloced {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 } 708 }
708 709
709 // This sampler is no longer the active sampler. 710 // This sampler is no longer the active sampler.
710 active_sampler_ = NULL; 711 active_sampler_ = NULL;
711 active_ = false; 712 active_ = false;
712 } 713 }
713 714
714 #endif // ENABLE_LOGGING_AND_PROFILING 715 #endif // ENABLE_LOGGING_AND_PROFILING
715 716
716 } } // namespace v8::internal 717 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform-freebsd.cc ('k') | src/platform-macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698