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

Issue 1706343002: Unsampling for the sampling heap profiler (Closed)

Created:
4 years, 10 months ago by mattloring
Modified:
4 years, 10 months ago
Reviewers:
rsilvera, ofrobots, alph, ulan
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Unsampling for the sampling heap profiler Implements poisson unsampling. A poisson process is used to determine which samples to collect based on a sample rate. Unsampling will approximate the true number of allocations at each site taking into account that smaller allocations are less likley to be sampled. This work was originally being done in the agent that consumes profiles but it is more efficient to do it here and individual consumers of the API should not have to worry about the mathematical details of the sampling process. R=ofrobots@google.com BUG= Committed: https://crrev.com/50537badae90c5ab5bd2c5b19a22f87534c61a90 Cr-Commit-Position: refs/heads/master@{#34234}

Patch Set 1 #

Patch Set 2 : Comment describing poisson unsampling #

Total comments: 4

Patch Set 3 : Add comment on rounding #

Total comments: 2

Patch Set 4 : Assert rate > 0 #

Patch Set 5 : Different sampling frequencies should give similar allocation counts #

Patch Set 6 : Elaborated on unsampling in comments #

Patch Set 7 : Compute percent change in tests #

Total comments: 4

Patch Set 8 : Adjust sampling rates in comparatives rate test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -13 lines) Patch
M src/profiler/sampling-heap-profiler.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -0 lines 0 comments Download
M src/profiler/sampling-heap-profiler.cc View 1 2 3 4 5 6 7 3 chunks +18 lines, -2 lines 0 comments Download
M test/cctest/test-heap-profiler.cc View 1 2 3 4 5 6 7 4 chunks +17 lines, -11 lines 0 comments Download

Messages

Total messages: 47 (18 generated)
mattloring
Relies on the re-landing of https://codereview.chromium.org/1697903002/.
4 years, 10 months ago (2016-02-18 23:46:13 UTC) #1
ofrobots
https://codereview.chromium.org/1706343002/diff/20001/src/profiler/sampling-heap-profiler.cc File src/profiler/sampling-heap-profiler.cc (right): https://codereview.chromium.org/1706343002/diff/20001/src/profiler/sampling-heap-profiler.cc#newcode46 src/profiler/sampling-heap-profiler.cc:46: return {size, static_cast<unsigned int>(count * scale + 0.5)}; Where ...
4 years, 10 months ago (2016-02-19 04:29:29 UTC) #2
mattloring
https://codereview.chromium.org/1706343002/diff/20001/src/profiler/sampling-heap-profiler.cc File src/profiler/sampling-heap-profiler.cc (right): https://codereview.chromium.org/1706343002/diff/20001/src/profiler/sampling-heap-profiler.cc#newcode46 src/profiler/sampling-heap-profiler.cc:46: return {size, static_cast<unsigned int>(count * scale + 0.5)}; On ...
4 years, 10 months ago (2016-02-19 04:31:07 UTC) #3
ofrobots
https://codereview.chromium.org/1706343002/diff/20001/src/profiler/sampling-heap-profiler.cc File src/profiler/sampling-heap-profiler.cc (right): https://codereview.chromium.org/1706343002/diff/20001/src/profiler/sampling-heap-profiler.cc#newcode46 src/profiler/sampling-heap-profiler.cc:46: return {size, static_cast<unsigned int>(count * scale + 0.5)}; On ...
4 years, 10 months ago (2016-02-19 04:46:43 UTC) #4
mattloring
https://codereview.chromium.org/1706343002/diff/20001/src/profiler/sampling-heap-profiler.cc File src/profiler/sampling-heap-profiler.cc (right): https://codereview.chromium.org/1706343002/diff/20001/src/profiler/sampling-heap-profiler.cc#newcode46 src/profiler/sampling-heap-profiler.cc:46: return {size, static_cast<unsigned int>(count * scale + 0.5)}; On ...
4 years, 10 months ago (2016-02-19 04:50:41 UTC) #5
ofrobots
https://codereview.chromium.org/1706343002/diff/40001/src/profiler/sampling-heap-profiler.cc File src/profiler/sampling-heap-profiler.cc (right): https://codereview.chromium.org/1706343002/diff/40001/src/profiler/sampling-heap-profiler.cc#newcode45 src/profiler/sampling-heap-profiler.cc:45: double scale = 1.0 / (1.0 - std::exp(-size / ...
4 years, 10 months ago (2016-02-19 05:01:28 UTC) #6
mattloring
https://codereview.chromium.org/1706343002/diff/40001/src/profiler/sampling-heap-profiler.cc File src/profiler/sampling-heap-profiler.cc (right): https://codereview.chromium.org/1706343002/diff/40001/src/profiler/sampling-heap-profiler.cc#newcode45 src/profiler/sampling-heap-profiler.cc:45: double scale = 1.0 / (1.0 - std::exp(-size / ...
4 years, 10 months ago (2016-02-19 05:16:10 UTC) #7
ofrobots
On 2016/02/19 05:16:10, mattloring wrote: > https://codereview.chromium.org/1706343002/diff/40001/src/profiler/sampling-heap-profiler.cc > File src/profiler/sampling-heap-profiler.cc (right): > > https://codereview.chromium.org/1706343002/diff/40001/src/profiler/sampling-heap-profiler.cc#newcode45 > ...
4 years, 10 months ago (2016-02-19 05:16:39 UTC) #8
ofrobots
On 2016/02/19 05:16:39, ofrobots wrote: > On 2016/02/19 05:16:10, mattloring wrote: > > > https://codereview.chromium.org/1706343002/diff/40001/src/profiler/sampling-heap-profiler.cc ...
4 years, 10 months ago (2016-02-19 05:17:05 UTC) #9
mattloring
On 2016/02/19 05:17:05, ofrobots wrote: > On 2016/02/19 05:16:39, ofrobots wrote: > > On 2016/02/19 ...
4 years, 10 months ago (2016-02-19 05:21:42 UTC) #10
mattloring
4 years, 10 months ago (2016-02-19 19:14:41 UTC) #14
ofrobots
On 2016/02/22 17:00:38, ofrobots wrote: > mailto:ofrobots@google.com changed reviewers: > + mailto:alph@chromium.org, mailto:ulan@chromium.org lgtm.
4 years, 10 months ago (2016-02-22 17:01:15 UTC) #16
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1706343002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1706343002/60001
4 years, 10 months ago (2016-02-22 21:27:16 UTC) #18
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_win64_rel_ng on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_win64_rel_ng/builds/3287)
4 years, 10 months ago (2016-02-22 21:31:48 UTC) #20
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1706343002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1706343002/80001
4 years, 10 months ago (2016-02-22 22:19:35 UTC) #22
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux64_avx2_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_avx2_rel/builds/10456)
4 years, 10 months ago (2016-02-22 22:34:45 UTC) #24
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1706343002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1706343002/100001
4 years, 10 months ago (2016-02-22 22:49:23 UTC) #26
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux64_avx2_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_avx2_rel/builds/10457)
4 years, 10 months ago (2016-02-22 23:01:34 UTC) #28
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1706343002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1706343002/120001
4 years, 10 months ago (2016-02-22 23:43:49 UTC) #30
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_win64_rel_ng on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_win64_rel_ng/builds/3291) v8_win64_rel_ng_triggered on ...
4 years, 10 months ago (2016-02-22 23:57:41 UTC) #32
alph
lgtm https://codereview.chromium.org/1706343002/diff/120001/src/profiler/sampling-heap-profiler.cc File src/profiler/sampling-heap-profiler.cc (right): https://codereview.chromium.org/1706343002/diff/120001/src/profiler/sampling-heap-profiler.cc#newcode43 src/profiler/sampling-heap-profiler.cc:43: v8::AllocationProfile::Allocation SamplingHeapProfiler::Unsample( How about naming it NormalizeCount?
4 years, 10 months ago (2016-02-23 08:37:59 UTC) #33
ulan
lgtm https://codereview.chromium.org/1706343002/diff/120001/src/profiler/sampling-heap-profiler.cc File src/profiler/sampling-heap-profiler.cc (right): https://codereview.chromium.org/1706343002/diff/120001/src/profiler/sampling-heap-profiler.cc#newcode65 src/profiler/sampling-heap-profiler.cc:65: CHECK(rate_ > 0); CHECK_GT
4 years, 10 months ago (2016-02-23 08:44:12 UTC) #34
mattloring
https://codereview.chromium.org/1706343002/diff/120001/src/profiler/sampling-heap-profiler.cc File src/profiler/sampling-heap-profiler.cc (right): https://codereview.chromium.org/1706343002/diff/120001/src/profiler/sampling-heap-profiler.cc#newcode43 src/profiler/sampling-heap-profiler.cc:43: v8::AllocationProfile::Allocation SamplingHeapProfiler::Unsample( On 2016/02/23 08:37:59, alph wrote: > How ...
4 years, 10 months ago (2016-02-23 18:34:32 UTC) #35
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1706343002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1706343002/140001
4 years, 10 months ago (2016-02-23 18:35:16 UTC) #37
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-23 19:03:44 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1706343002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1706343002/140001
4 years, 10 months ago (2016-02-24 08:02:46 UTC) #42
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 10 months ago (2016-02-24 08:04:23 UTC) #44
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/50537badae90c5ab5bd2c5b19a22f87534c61a90 Cr-Commit-Position: refs/heads/master@{#34234}
4 years, 10 months ago (2016-02-24 08:05:24 UTC) #46
rsilvera
4 years, 10 months ago (2016-02-24 14:34:19 UTC) #47
Message was sent while issue was closed.
lgtm

Powered by Google App Engine
This is Rietveld 408576698