Commit d7321376 authored by mlippautz's avatar mlippautz Committed by Commit bot

[heap] ObjectStats: Use ieee754 log2

TBR=ulan@chromium.org
NOTRY=true

Review-Url: https://codereview.chromium.org/2147983002
Cr-Commit-Position: refs/heads/master@{#37723}
parent 06b233c9
......@@ -5,8 +5,7 @@
#ifndef V8_HEAP_OBJECT_STATS_H_
#define V8_HEAP_OBJECT_STATS_H_
#include <math.h>
#include "src/base/ieee754.h"
#include "src/heap/heap.h"
#include "src/heap/objects-visiting.h"
#include "src/objects.h"
......@@ -92,8 +91,8 @@ class ObjectStats {
int HistogramIndexFromSize(size_t size) {
if (size == 0) return 0;
int idx =
static_cast<int>(log2(static_cast<double>(size))) - kFirstBucketShift;
int idx = static_cast<int>(base::ieee754::log2(static_cast<double>(size))) -
kFirstBucketShift;
return idx < 0 ? 0 : idx;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment