DescriptionAdd 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 #
Messages
Total messages: 6 (0 generated)
|