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

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

Issue 12475016: Maintain API compatibility with older versions of V8. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 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/platform-cygwin.cc ('k') | src/platform-linux.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 } 708 }
709 if (v8::Locker::IsActive() && 709 if (v8::Locker::IsActive() &&
710 !isolate->thread_manager()->IsLockedByCurrentThread()) { 710 !isolate->thread_manager()->IsLockedByCurrentThread()) {
711 return; 711 return;
712 } 712 }
713 713
714 Sampler* sampler = isolate->logger()->sampler(); 714 Sampler* sampler = isolate->logger()->sampler();
715 if (sampler == NULL || !sampler->IsActive()) return; 715 if (sampler == NULL || !sampler->IsActive()) return;
716 716
717 TickSample sample_obj; 717 TickSample sample_obj;
718 TickSample* sample = isolate->cpu_profiler()->TickSampleEvent(); 718 TickSample* sample = CpuProfiler::TickSampleEvent(isolate);
719 if (sample == NULL) sample = &sample_obj; 719 if (sample == NULL) sample = &sample_obj;
720 720
721 // Extracting the sample from the context is extremely machine dependent. 721 // Extracting the sample from the context is extremely machine dependent.
722 ucontext_t* ucontext = reinterpret_cast<ucontext_t*>(context); 722 ucontext_t* ucontext = reinterpret_cast<ucontext_t*>(context);
723 mcontext_t& mcontext = ucontext->uc_mcontext; 723 mcontext_t& mcontext = ucontext->uc_mcontext;
724 sample->state = isolate->current_vm_state(); 724 sample->state = isolate->current_vm_state();
725 #if V8_HOST_ARCH_IA32 725 #if V8_HOST_ARCH_IA32
726 sample->pc = reinterpret_cast<Address>(mcontext.mc_eip); 726 sample->pc = reinterpret_cast<Address>(mcontext.mc_eip);
727 sample->sp = reinterpret_cast<Address>(mcontext.mc_esp); 727 sample->sp = reinterpret_cast<Address>(mcontext.mc_esp);
728 sample->fp = reinterpret_cast<Address>(mcontext.mc_ebp); 728 sample->fp = reinterpret_cast<Address>(mcontext.mc_ebp);
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 892
893 893
894 void Sampler::Stop() { 894 void Sampler::Stop() {
895 ASSERT(IsActive()); 895 ASSERT(IsActive());
896 SignalSender::RemoveActiveSampler(this); 896 SignalSender::RemoveActiveSampler(this);
897 SetActive(false); 897 SetActive(false);
898 } 898 }
899 899
900 900
901 } } // namespace v8::internal 901 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform-cygwin.cc ('k') | src/platform-linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698