OLD | NEW |
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 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 kMmapFd, | 697 kMmapFd, |
698 kMmapFdOffset) != MAP_FAILED; | 698 kMmapFdOffset) != MAP_FAILED; |
699 } | 699 } |
700 | 700 |
701 | 701 |
702 bool VirtualMemory::ReleaseRegion(void* base, size_t size) { | 702 bool VirtualMemory::ReleaseRegion(void* base, size_t size) { |
703 return munmap(base, size) == 0; | 703 return munmap(base, size) == 0; |
704 } | 704 } |
705 | 705 |
706 | 706 |
| 707 bool VirtualMemory::HasLazyCommits() { |
| 708 return true; |
| 709 } |
| 710 |
| 711 |
707 class Thread::PlatformData : public Malloced { | 712 class Thread::PlatformData : public Malloced { |
708 public: | 713 public: |
709 PlatformData() : thread_(kNoThread) {} | 714 PlatformData() : thread_(kNoThread) {} |
710 | 715 |
711 pthread_t thread_; // Thread handle for pthread. | 716 pthread_t thread_; // Thread handle for pthread. |
712 }; | 717 }; |
713 | 718 |
714 Thread::Thread(const Options& options) | 719 Thread::Thread(const Options& options) |
715 : data_(new PlatformData()), | 720 : data_(new PlatformData()), |
716 stack_size_(options.stack_size()) { | 721 stack_size_(options.stack_size()) { |
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1287 | 1292 |
1288 void Sampler::Stop() { | 1293 void Sampler::Stop() { |
1289 ASSERT(IsActive()); | 1294 ASSERT(IsActive()); |
1290 CpuProfilerSignalHandler::RestoreSignalHandler(); | 1295 CpuProfilerSignalHandler::RestoreSignalHandler(); |
1291 SignalSender::RemoveActiveSampler(this); | 1296 SignalSender::RemoveActiveSampler(this); |
1292 SetActive(false); | 1297 SetActive(false); |
1293 } | 1298 } |
1294 | 1299 |
1295 | 1300 |
1296 } } // namespace v8::internal | 1301 } } // namespace v8::internal |
OLD | NEW |