Index: src/profiler/sampling-heap-profiler.cc |
diff --git a/src/profiler/sampling-heap-profiler.cc b/src/profiler/sampling-heap-profiler.cc |
index db9214d14d7f90f7d93dfad5e40c4febba893f10..b4361ee849c2f394d294841d3e41df6f299b2c45 100644 |
--- a/src/profiler/sampling-heap-profiler.cc |
+++ b/src/profiler/sampling-heap-profiler.cc |
@@ -7,6 +7,7 @@ |
#include <stdint.h> |
#include <memory> |
#include "src/api.h" |
+#include "src/base/ieee754.h" |
#include "src/base/utils/random-number-generator.h" |
#include "src/frames-inl.h" |
#include "src/heap/heap.h" |
@@ -27,7 +28,7 @@ intptr_t SamplingAllocationObserver::GetNextSampleInterval(uint64_t rate) { |
return static_cast<intptr_t>(rate); |
} |
double u = random_->NextDouble(); |
- double next = (-std::log(u)) * rate; |
+ double next = (-base::ieee754::log(u)) * rate; |
return next < kPointerSize |
? kPointerSize |
: (next > INT_MAX ? INT_MAX : static_cast<intptr_t>(next)); |