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

Unified Diff: src/platform-cygwin.cc

Issue 10871039: Replacing circular queue by single buffer in CPU Profiler. (Closed) Base URL: http://git.chromium.org/external/v8.git@profiling
Patch Set: an attempt to fix a test that strangely crashed only once Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: src/platform-cygwin.cc
diff --git a/src/platform-cygwin.cc b/src/platform-cygwin.cc
index 702b1d2115bf05920822fac212f49d9981f7d99c..b39dfc0eef8aa6132fee8de5ab519d03dcabcb98 100644
--- a/src/platform-cygwin.cc
+++ b/src/platform-cygwin.cc
@@ -692,9 +692,8 @@ class SamplerThread : public Thread {
CONTEXT context;
memset(&context, 0, sizeof(context));
- TickSample sample_obj;
- TickSample* sample = CpuProfiler::TickSampleEvent(sampler->isolate());
- if (sample == NULL) sample = &sample_obj;
+ TickSample* sample = CpuProfiler::StartTickSampleEvent(sampler->isolate());
+ if (sample == NULL) return;
static const DWORD kSuspendFailed = static_cast<DWORD>(-1);
if (SuspendThread(profiled_thread) == kSuspendFailed) return;
@@ -714,6 +713,7 @@ class SamplerThread : public Thread {
sampler->SampleStack(sample);
sampler->Tick(sample);
}
+ CpuProfiler::FinishTickSampleEvent(sampler->isolate());
ResumeThread(profiled_thread);
}
« src/cpu-profiler-inl.h ('K') | « src/cpu-profiler-inl.h ('k') | src/platform-freebsd.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698