Commit 8f4c5abf authored by Peter Marshall's avatar Peter Marshall Committed by Commit Bot

[cpu-profiler] Fix flaky MultipleIsolates test

This test is only flaky because the js code being profiled causes a
'fast-c-call' which is a call from JS to C without an exit frame.

The profiler stumbles on these and reads the stack of C++ frames when
it shouldn't, causing ASAN errors. This is not actually related to
the multiple isolates, so I'm changing the test to profile different
JS code that does not cause these types of calls. There is already a
test for fast-c-calls - NativeFrameStackTrace (which currently fails).

Bug: v8:8464
Change-Id: I32818f0894e5680cf5a39779a2779eda36dfe9f1
Reviewed-on: https://chromium-review.googlesource.com/c/1337571
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57547}
parent bd8ed720
...@@ -91,7 +91,6 @@ ...@@ -91,7 +91,6 @@
'test-cpu-profiler/NativeAccessorUninitializedIC': [SKIP], 'test-cpu-profiler/NativeAccessorUninitializedIC': [SKIP],
'test-cpu-profiler/SampleWhenFrameIsNotSetup': [SKIP], 'test-cpu-profiler/SampleWhenFrameIsNotSetup': [SKIP],
'test-cpu-profiler/TracingCpuProfiler': [SKIP], 'test-cpu-profiler/TracingCpuProfiler': [SKIP],
'test-cpu-profiler/MultipleIsolates': [SKIP],
'test-sampler/LibSamplerCollectSample': [SKIP], 'test-sampler/LibSamplerCollectSample': [SKIP],
# BUG(7202). The test is flaky. # BUG(7202). The test is flaky.
......
...@@ -2560,12 +2560,13 @@ void ProfileSomeCode(v8::Isolate* isolate) { ...@@ -2560,12 +2560,13 @@ void ProfileSomeCode(v8::Isolate* isolate) {
profiler->StartProfiling(profile_name); profiler->StartProfiling(profile_name);
const char* source = R"( const char* source = R"(
function foo() { function foo() {
var s = {}; var x = 0;
for (var i = 0; i < 1e4; ++i) { for (var i = 0; i < 1e4; i++) {
for (var j = 0; j < 100; j++) { for (var j = 0; j < 1e3; j++) {
s['item' + j] = 'bar'; x += i * j;
} }
} }
return x;
} }
foo(); foo();
)"; )";
......
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