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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 signal_handler_installed_ = false; | 565 signal_handler_installed_ = false; |
566 } | 566 } |
567 | 567 |
568 bool signal_handler_installed_; | 568 bool signal_handler_installed_; |
569 struct sigaction old_signal_handler_; | 569 struct sigaction old_signal_handler_; |
570 struct itimerval old_timer_value_; | 570 struct itimerval old_timer_value_; |
571 }; | 571 }; |
572 | 572 |
573 | 573 |
574 Sampler::Sampler(int interval, bool profiling) | 574 Sampler::Sampler(int interval, bool profiling) |
575 : interval_(interval), profiling_(profiling), active_(false) { | 575 : interval_(interval), |
| 576 profiling_(profiling), |
| 577 synchronous_(profiling), |
| 578 active_(false), |
| 579 samples_taken_(0) { |
576 data_ = new PlatformData(); | 580 data_ = new PlatformData(); |
577 } | 581 } |
578 | 582 |
579 | 583 |
580 Sampler::~Sampler() { | 584 Sampler::~Sampler() { |
581 delete data_; | 585 delete data_; |
582 } | 586 } |
583 | 587 |
584 | 588 |
585 void Sampler::Start() { | 589 void Sampler::Start() { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
618 } | 622 } |
619 | 623 |
620 // This sampler is no longer the active sampler. | 624 // This sampler is no longer the active sampler. |
621 active_sampler_ = NULL; | 625 active_sampler_ = NULL; |
622 active_ = false; | 626 active_ = false; |
623 } | 627 } |
624 | 628 |
625 #endif // ENABLE_LOGGING_AND_PROFILING | 629 #endif // ENABLE_LOGGING_AND_PROFILING |
626 | 630 |
627 } } // namespace v8::internal | 631 } } // namespace v8::internal |
OLD | NEW |