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

Unified Diff: src/profiler/sampling-heap-profiler.cc

Issue 1702023002: [wasm] Replace the BufferedRawMachineAssemblerTester in the WasmRunner. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Code cleanup. Created 4 years, 10 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
« no previous file with comments | « no previous file | test/cctest/compiler/c-signature.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profiler/sampling-heap-profiler.cc
diff --git a/src/profiler/sampling-heap-profiler.cc b/src/profiler/sampling-heap-profiler.cc
index e65279ab8f9c1b2d85cbd5c633a4f0574038b21c..2796e3e0cba695ad2773a696c07f135e9b250f39 100644
--- a/src/profiler/sampling-heap-profiler.cc
+++ b/src/profiler/sampling-heap-profiler.cc
@@ -24,7 +24,7 @@ namespace internal {
// next_sample = (- ln u) / λ
intptr_t SamplingAllocationObserver::GetNextSampleInterval(uint64_t rate) {
if (FLAG_sampling_heap_profiler_suppress_randomness) {
- return rate;
+ return static_cast<intptr_t>(rate);
}
double u = random_->NextDouble();
double next = (-std::log(u)) * rate;
@@ -38,9 +38,11 @@ SamplingHeapProfiler::SamplingHeapProfiler(Heap* heap, StringsStorage* names,
: isolate_(heap->isolate()),
heap_(heap),
new_space_observer_(new SamplingAllocationObserver(
- heap_, rate, rate, this, heap->isolate()->random_number_generator())),
+ heap_, static_cast<intptr_t>(rate), rate, this,
+ heap->isolate()->random_number_generator())),
other_spaces_observer_(new SamplingAllocationObserver(
- heap_, rate, rate, this, heap->isolate()->random_number_generator())),
+ heap_, static_cast<intptr_t>(rate), rate, this,
+ heap->isolate()->random_number_generator())),
names_(names),
samples_(),
stack_depth_(stack_depth) {
« no previous file with comments | « no previous file | test/cctest/compiler/c-signature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698