| Index: src/platform-freebsd.cc
|
| diff --git a/src/platform-freebsd.cc b/src/platform-freebsd.cc
|
| index 5697911c3ebb7cbf1b5f475ba9b617b7c9992f22..67d3f6bfda7537777ff41e04be955025cda4528b 100644
|
| --- a/src/platform-freebsd.cc
|
| +++ b/src/platform-freebsd.cc
|
| @@ -678,9 +678,8 @@ static void ProfilerSignalHandler(int signal, siginfo_t* info, void* context) {
|
| Sampler* sampler = isolate->logger()->sampler();
|
| if (sampler == NULL || !sampler->IsActive()) return;
|
|
|
| - TickSample sample_obj;
|
| - TickSample* sample = CpuProfiler::TickSampleEvent(isolate);
|
| - if (sample == NULL) sample = &sample_obj;
|
| + TickSample* sample = CpuProfiler::StartTickSampleEvent(isolate);
|
| + if (sample == NULL) return;
|
|
|
| // Extracting the sample from the context is extremely machine dependent.
|
| ucontext_t* ucontext = reinterpret_cast<ucontext_t*>(context);
|
| @@ -701,6 +700,7 @@ static void ProfilerSignalHandler(int signal, siginfo_t* info, void* context) {
|
| #endif
|
| sampler->SampleStack(sample);
|
| sampler->Tick(sample);
|
| + CpuProfiler::FinishTickSampleEvent(isolate);
|
| }
|
|
|
|
|
|
|