Commit 6396a361 authored by Peter Marshall's avatar Peter Marshall Committed by Commit Bot

[cpu-profiler] Enable Issue1398 test which has been fixed

This test was incidentally fixed by
https://chromium-review.googlesource.com/c/v8/v8/+/1280436.

Calls to StartTickSample() and FinishTickSample() are not permitted by
multiple producers. If the signal handler interrupts the main thread,
both might receive the same pointer into the circular buffer and one
will overwrite the data of the other.

This means we cannot call it in tests, and have to use AddSample()
instead.

Bug: v8:8209

Change-Id: I6904204e88077f704f819b52cde0fdaab0f13462
Reviewed-on: https://chromium-review.googlesource.com/c/1299022Reviewed-by: 's avatarAlexei Filippov <alph@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57019}
parent 1dec99f5
......@@ -145,7 +145,7 @@ class ProfilerEventsProcessor : public base::Thread, public CodeEventObserver {
// Puts current stack into the tick sample events buffer.
void AddCurrentStack(bool update_stats = false);
void AddDeoptStack(Address from, int fp_to_sp_delta);
// Puts the given sample into the tick sample events buffer.
// Add a sample into the tick sample events buffer. Used for testing.
void AddSample(TickSample sample);
protected:
......@@ -187,6 +187,8 @@ class SamplingEventsProcessor : public ProfilerEventsProcessor {
// queue (because the structure is of fixed width, but usually not all
// stack frame entries are filled.) This method returns a pointer to the
// next record of the buffer.
// These methods are not thread-safe and should only ever be called by one
// producer (from CpuSampler::SampleStack()). For testing, use AddSample.
inline TickSample* StartTickSample();
inline void FinishTickSample();
......
......@@ -93,9 +93,6 @@
'test-cpu-profiler/TracingCpuProfiler': [SKIP],
'test-sampler/LibSamplerCollectSample': [SKIP],
# BUG(v8:8209). Flaky
'test-cpu-profiler/Issue1398': [SKIP],
# BUG(7202). The test is flaky.
'test-cpu-profiler/NativeFrameStackTrace': [SKIP],
......
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