Chromium Code Reviews| 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 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 943 } | 943 } |
| 944 } | 944 } |
| 945 if (runtime_profiler_enabled) { | 945 if (runtime_profiler_enabled) { |
| 946 if (!SamplerRegistry::IterateActiveSamplers(&DoRuntimeProfile, | 946 if (!SamplerRegistry::IterateActiveSamplers(&DoRuntimeProfile, |
| 947 NULL)) { | 947 NULL)) { |
| 948 return; | 948 return; |
| 949 } | 949 } |
| 950 } | 950 } |
| 951 Sleep(FULL_INTERVAL); | 951 Sleep(FULL_INTERVAL); |
| 952 } | 952 } |
| 953 state = SamplerRegistry::GetState(); | |
|
Vitaly Repeshko
2011/03/21 17:16:10
*Facepalm*
But please fix it in a slightly differ
| |
| 953 } | 954 } |
| 954 } | 955 } |
| 955 | 956 |
| 956 static void DoCpuProfile(Sampler* sampler, void* raw_sender) { | 957 static void DoCpuProfile(Sampler* sampler, void* raw_sender) { |
| 957 if (!sampler->IsProfiling()) return; | 958 if (!sampler->IsProfiling()) return; |
| 958 SignalSender* sender = reinterpret_cast<SignalSender*>(raw_sender); | 959 SignalSender* sender = reinterpret_cast<SignalSender*>(raw_sender); |
| 959 sender->SendProfilingSignal(sampler->platform_data()->vm_tid()); | 960 sender->SendProfilingSignal(sampler->platform_data()->vm_tid()); |
| 960 } | 961 } |
| 961 | 962 |
| 962 static void DoRuntimeProfile(Sampler* sampler, void* ignored) { | 963 static void DoRuntimeProfile(Sampler* sampler, void* ignored) { |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1033 | 1034 |
| 1034 void Sampler::Stop() { | 1035 void Sampler::Stop() { |
| 1035 ASSERT(IsActive()); | 1036 ASSERT(IsActive()); |
| 1036 SignalSender::RemoveActiveSampler(this); | 1037 SignalSender::RemoveActiveSampler(this); |
| 1037 SetActive(false); | 1038 SetActive(false); |
| 1038 } | 1039 } |
| 1039 | 1040 |
| 1040 #endif // ENABLE_LOGGING_AND_PROFILING | 1041 #endif // ENABLE_LOGGING_AND_PROFILING |
| 1041 | 1042 |
| 1042 } } // namespace v8::internal | 1043 } } // namespace v8::internal |
| OLD | NEW |