Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(772)

Side by Side Diff: src/platform-win32.cc

Issue 6712062: Fix DevTools CPU profiler after isolates merge. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« src/platform-linux.cc ('K') | « src/platform-linux.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1913 matching lines...) Expand 10 before | Expand all | Expand 10 after
1924 if (!SamplerRegistry::IterateActiveSamplers(&DoCpuProfile, this)) { 1924 if (!SamplerRegistry::IterateActiveSamplers(&DoCpuProfile, this)) {
1925 return; 1925 return;
1926 } 1926 }
1927 } 1927 }
1928 if (runtime_profiler_enabled) { 1928 if (runtime_profiler_enabled) {
1929 if (!SamplerRegistry::IterateActiveSamplers(&DoRuntimeProfile, NULL)) { 1929 if (!SamplerRegistry::IterateActiveSamplers(&DoRuntimeProfile, NULL)) {
1930 return; 1930 return;
1931 } 1931 }
1932 } 1932 }
1933 OS::Sleep(interval_); 1933 OS::Sleep(interval_);
1934 state = SamplerRegistry::GetState();
1934 } 1935 }
1935 } 1936 }
1936 1937
1937 static void DoCpuProfile(Sampler* sampler, void* raw_sampler_thread) { 1938 static void DoCpuProfile(Sampler* sampler, void* raw_sampler_thread) {
1938 if (!sampler->isolate()->IsInitialized()) return; 1939 if (!sampler->isolate()->IsInitialized()) return;
1939 if (!sampler->IsProfiling()) return; 1940 if (!sampler->IsProfiling()) return;
1940 SamplerThread* sampler_thread = 1941 SamplerThread* sampler_thread =
1941 reinterpret_cast<SamplerThread*>(raw_sampler_thread); 1942 reinterpret_cast<SamplerThread*>(raw_sampler_thread);
1942 sampler_thread->SampleContext(sampler); 1943 sampler_thread->SampleContext(sampler);
1943 } 1944 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
2020 2021
2021 void Sampler::Stop() { 2022 void Sampler::Stop() {
2022 ASSERT(IsActive()); 2023 ASSERT(IsActive());
2023 SamplerThread::RemoveActiveSampler(this); 2024 SamplerThread::RemoveActiveSampler(this);
2024 SetActive(false); 2025 SetActive(false);
2025 } 2026 }
2026 2027
2027 #endif // ENABLE_LOGGING_AND_PROFILING 2028 #endif // ENABLE_LOGGING_AND_PROFILING
2028 2029
2029 } } // namespace v8::internal 2030 } } // namespace v8::internal
OLDNEW
« src/platform-linux.cc ('K') | « src/platform-linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698