| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 #include <strings.h> // index | 45 #include <strings.h> // index |
| 46 #include <errno.h> | 46 #include <errno.h> |
| 47 #include <stdarg.h> | 47 #include <stdarg.h> |
| 48 #include <limits.h> | 48 #include <limits.h> |
| 49 | 49 |
| 50 #undef MAP_TYPE | 50 #undef MAP_TYPE |
| 51 | 51 |
| 52 #include "v8.h" | 52 #include "v8.h" |
| 53 | 53 |
| 54 #include "platform.h" | 54 #include "platform.h" |
| 55 #include "vm-state-inl.h" |
| 55 | 56 |
| 56 | 57 |
| 57 namespace v8 { | 58 namespace v8 { |
| 58 namespace internal { | 59 namespace internal { |
| 59 | 60 |
| 60 // 0 is never a valid thread id on OpenBSD since tids and pids share a | 61 // 0 is never a valid thread id on OpenBSD since tids and pids share a |
| 61 // name space and pid 0 is used to kill the group (see man 2 kill). | 62 // name space and pid 0 is used to kill the group (see man 2 kill). |
| 62 static const pthread_t kNoThread = (pthread_t) 0; | 63 static const pthread_t kNoThread = (pthread_t) 0; |
| 63 | 64 |
| 64 | 65 |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 PlatformData() { | 568 PlatformData() { |
| 568 signal_handler_installed_ = false; | 569 signal_handler_installed_ = false; |
| 569 } | 570 } |
| 570 | 571 |
| 571 bool signal_handler_installed_; | 572 bool signal_handler_installed_; |
| 572 struct sigaction old_signal_handler_; | 573 struct sigaction old_signal_handler_; |
| 573 struct itimerval old_timer_value_; | 574 struct itimerval old_timer_value_; |
| 574 }; | 575 }; |
| 575 | 576 |
| 576 | 577 |
| 577 Sampler::Sampler(Isolate* isolate, int interval, bool profiling) | 578 Sampler::Sampler(Isolate* isolate, int interval) |
| 578 : isolate_(isolate), | 579 : isolate_(isolate), |
| 579 interval_(interval), | 580 interval_(interval), |
| 580 profiling_(profiling), | 581 profiling_(false), |
| 581 synchronous_(profiling), | |
| 582 active_(false), | 582 active_(false), |
| 583 samples_taken_(0) { | 583 samples_taken_(0) { |
| 584 data_ = new PlatformData(); | 584 data_ = new PlatformData(); |
| 585 } | 585 } |
| 586 | 586 |
| 587 | 587 |
| 588 Sampler::~Sampler() { | 588 Sampler::~Sampler() { |
| 589 delete data_; | 589 delete data_; |
| 590 } | 590 } |
| 591 | 591 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 } | 626 } |
| 627 | 627 |
| 628 // This sampler is no longer the active sampler. | 628 // This sampler is no longer the active sampler. |
| 629 active_sampler_ = NULL; | 629 active_sampler_ = NULL; |
| 630 active_ = false; | 630 active_ = false; |
| 631 } | 631 } |
| 632 | 632 |
| 633 #endif // ENABLE_LOGGING_AND_PROFILING | 633 #endif // ENABLE_LOGGING_AND_PROFILING |
| 634 | 634 |
| 635 } } // namespace v8::internal | 635 } } // namespace v8::internal |
| OLD | NEW |