OLD | NEW |
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 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
858 reinterpret_cast<Sampler::PlatformData*>(arg); | 858 reinterpret_cast<Sampler::PlatformData*>(arg); |
859 data->SignalSender(); | 859 data->SignalSender(); |
860 return 0; | 860 return 0; |
861 } | 861 } |
862 | 862 |
863 | 863 |
864 Sampler::Sampler(int interval, bool profiling) | 864 Sampler::Sampler(int interval, bool profiling) |
865 : interval_(interval), | 865 : interval_(interval), |
866 profiling_(profiling), | 866 profiling_(profiling), |
867 synchronous_(profiling), | 867 synchronous_(profiling), |
868 active_(false) { | 868 active_(false), |
| 869 samples_taken_(0) { |
869 data_ = new PlatformData(this); | 870 data_ = new PlatformData(this); |
870 } | 871 } |
871 | 872 |
872 | 873 |
873 Sampler::~Sampler() { | 874 Sampler::~Sampler() { |
874 ASSERT(!data_->signal_sender_launched_); | 875 ASSERT(!data_->signal_sender_launched_); |
875 delete data_; | 876 delete data_; |
876 } | 877 } |
877 | 878 |
878 | 879 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
920 } | 921 } |
921 | 922 |
922 // This sampler is no longer the active sampler. | 923 // This sampler is no longer the active sampler. |
923 active_sampler_ = NULL; | 924 active_sampler_ = NULL; |
924 } | 925 } |
925 | 926 |
926 | 927 |
927 #endif // ENABLE_LOGGING_AND_PROFILING | 928 #endif // ENABLE_LOGGING_AND_PROFILING |
928 | 929 |
929 } } // namespace v8::internal | 930 } } // namespace v8::internal |
OLD | NEW |