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 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
893 data_ = new PlatformData; | 893 data_ = new PlatformData; |
894 } | 894 } |
895 | 895 |
896 | 896 |
897 Sampler::~Sampler() { | 897 Sampler::~Sampler() { |
898 ASSERT(!IsActive()); | 898 ASSERT(!IsActive()); |
899 delete data_; | 899 delete data_; |
900 } | 900 } |
901 | 901 |
902 | 902 |
| 903 void Sampler::DoSample() { |
| 904 // TODO: implement |
| 905 } |
| 906 |
| 907 |
903 void Sampler::Start() { | 908 void Sampler::Start() { |
904 ASSERT(!IsActive()); | 909 ASSERT(!IsActive()); |
905 SetActive(true); | 910 SetActive(true); |
906 SamplerThread::AddActiveSampler(this); | 911 SamplerThread::AddActiveSampler(this); |
907 } | 912 } |
908 | 913 |
909 | 914 |
910 void Sampler::Stop() { | 915 void Sampler::Stop() { |
911 ASSERT(IsActive()); | 916 ASSERT(IsActive()); |
912 SamplerThread::RemoveActiveSampler(this); | 917 SamplerThread::RemoveActiveSampler(this); |
913 SetActive(false); | 918 SetActive(false); |
914 } | 919 } |
915 | 920 |
916 | 921 |
917 } } // namespace v8::internal | 922 } } // namespace v8::internal |
OLD | NEW |