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

Issue 13627002: Add sanity test for CPU profiler (Closed)

Created:
7 years, 8 months ago by yurys
Modified:
7 years, 8 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Add sanity test for CPU profiler The new test checks full CPU profiling cycle: using public V8 API it starts profiling, executes a script, stops profiling and analyzes collected profile to check that its top-down tree has expected strutcture. The script that is being profiled is guaranteed to run > 200ms to make sure enough samples are collected. To avoid possible flakiness due to non-deterministic time required to start new thread on varios OSs when Sampler and ProfilerEventsProcessor threads are being started the main thread is blocked until the threads are running. Also I removed the heuristic in profile-generator.cc where we try to figure out if the value on top of the sampled stack is return address of some frameless stub invocation. The code periodically gives false positive with the new test ending up in an extra node in the collected cpu profile. After discussion with jkummerow@ we concluded that the logic is too fragile and that we can address frameless stub invocations in a more reliable way later should they have a noticeable effect on cpu profiling. BUG=None Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=14205

Patch Set 1 #

Patch Set 2 : Fixed long line, added comment #

Total comments: 2

Patch Set 3 : Changed loop function to accept minimal duration in ms #

Patch Set 4 : Removed unused return #

Patch Set 5 : Removed frame generation from SP value #

Patch Set 6 : Start sampler and processor threads synchronously #

Unified diffs Side-by-side diffs Delta from patch set Stats (+246 lines, -86 lines) Patch
M src/cpu-profiler.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M src/platform.h View 1 2 3 4 5 5 chunks +69 lines, -54 lines 0 comments Download
M src/platform-cygwin.cc View 1 2 3 4 5 3 chunks +4 lines, -3 lines 0 comments Download
M src/platform-freebsd.cc View 1 2 3 4 5 3 chunks +4 lines, -3 lines 0 comments Download
M src/platform-linux.cc View 1 2 3 4 5 3 chunks +4 lines, -3 lines 0 comments Download
M src/platform-macos.cc View 1 2 3 4 5 3 chunks +4 lines, -3 lines 0 comments Download
M src/platform-nullos.cc View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M src/platform-openbsd.cc View 1 2 3 4 5 3 chunks +4 lines, -3 lines 0 comments Download
M src/platform-solaris.cc View 1 2 3 4 5 3 chunks +4 lines, -3 lines 0 comments Download
M src/platform-win32.cc View 1 2 3 4 5 3 chunks +4 lines, -3 lines 0 comments Download
M src/profile-generator.cc View 1 2 3 4 1 chunk +0 lines, -8 lines 0 comments Download
M test/cctest/test-cpu-profiler.cc View 1 2 3 4 5 3 chunks +145 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
yurys
7 years, 8 months ago (2013-04-04 09:24:02 UTC) #1
loislo
otherwise looks good https://codereview.chromium.org/13627002/diff/2001/test/cctest/test-cpu-profiler.cc File test/cctest/test-cpu-profiler.cc (right): https://codereview.chromium.org/13627002/diff/2001/test/cctest/test-cpu-profiler.cc#newcode459 test/cctest/test-cpu-profiler.cc:459: " while(n > 1) {\n" it ...
7 years, 8 months ago (2013-04-04 09:53:17 UTC) #2
yurys
https://codereview.chromium.org/13627002/diff/2001/test/cctest/test-cpu-profiler.cc File test/cctest/test-cpu-profiler.cc (right): https://codereview.chromium.org/13627002/diff/2001/test/cctest/test-cpu-profiler.cc#newcode459 test/cctest/test-cpu-profiler.cc:459: " while(n > 1) {\n" On 2013/04/04 09:53:17, loislo ...
7 years, 8 months ago (2013-04-04 10:21:05 UTC) #3
loislo
lgtm
7 years, 8 months ago (2013-04-04 11:42:30 UTC) #4
Jakob Kummerow
lgtm
7 years, 8 months ago (2013-04-10 09:34:33 UTC) #5
yurys
7 years, 8 months ago (2013-04-10 09:48:01 UTC) #6
Message was sent while issue was closed.
Committed patchset #6 manually as r14205.

Powered by Google App Engine
This is Rietveld 408576698