Commit 5efdcf59 authored by Alexei Filippov's avatar Alexei Filippov Committed by Commit Bot

[heap profiler] Reenable MemlogBrowserTest/EndToEnd/* tests

Make all tests run in sampling mode. That should fix the timeout errors
while still covering all the execution paths.

Make all the tests run both streaming and non-streaming mode.

BUG=921036

Change-Id: I7cd164ab91c4e8f786799b56d0582e69c467831a
Reviewed-on: https://chromium-review.googlesource.com/c/1449162
Commit-Queue: Alexei Filippov <alph@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Auto-Submit: Alexei Filippov <alph@chromium.org>
Reviewed-by: default avatarErik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#628198}
parent 54b5f72d
...@@ -84,13 +84,7 @@ class MemlogBrowserTest : public InProcessBrowserTest, ...@@ -84,13 +84,7 @@ class MemlogBrowserTest : public InProcessBrowserTest,
// Ensure invocations via TracingController can generate a valid JSON file with // Ensure invocations via TracingController can generate a valid JSON file with
// expected data. // expected data.
// TODO(crbug.com/921036): Test is flaky. IN_PROC_BROWSER_TEST_P(MemlogBrowserTest, EndToEnd) {
#if defined(OS_LINUX)
#define MAYBE_EndToEnd DISABLED_EndToEnd
#else
#define MAYBE_EndToEnd EndToEnd
#endif
IN_PROC_BROWSER_TEST_P(MemlogBrowserTest, MAYBE_EndToEnd) {
LOG(INFO) << "Memlog mode: " << static_cast<int>(GetParam().mode); LOG(INFO) << "Memlog mode: " << static_cast<int>(GetParam().mode);
LOG(INFO) << "Memlog stack mode: " << static_cast<int>(GetParam().stack_mode); LOG(INFO) << "Memlog stack mode: " << static_cast<int>(GetParam().stack_mode);
LOG(INFO) << "Stream samples: " << GetParam().stream_samples; LOG(INFO) << "Stream samples: " << GetParam().stream_samples;
...@@ -126,60 +120,37 @@ std::vector<TestParam> GetParams() { ...@@ -126,60 +120,37 @@ std::vector<TestParam> GetParams() {
stack_modes.push_back(mojom::StackMode::NATIVE_WITHOUT_THREAD_NAMES); stack_modes.push_back(mojom::StackMode::NATIVE_WITHOUT_THREAD_NAMES);
stack_modes.push_back(mojom::StackMode::PSEUDO); stack_modes.push_back(mojom::StackMode::PSEUDO);
for (const auto& mode : dynamic_start_modes) { for (bool stream_samples : (bool[]){true, false}) {
for (const auto& stack_mode : stack_modes) { for (const auto& mode : dynamic_start_modes) {
params.push_back({mode, stack_mode, true /* stream_samples */, for (const auto& stack_mode : stack_modes) {
false /* start_profiling_with_command_line_flag */, params.push_back({mode, stack_mode, stream_samples,
false /* should_sample */, false /* start_profiling_with_command_line_flag */,
false /* sample_everything*/}); true /* should_sample */,
false /* sample_everything*/});
}
} }
}
// For unknown reasons, renderer profiling has become flaky on ChromeOS. This is // For unknown reasons, renderer profiling has become flaky on ChromeOS. This is
// likely happening because the renderers are never being given the signal to // likely happening because the renderers are never being given the signal to
// start profiling. It's unclear why this happens. https://crbug.com/843843. // start profiling. It's unclear why this happens. https://crbug.com/843843.
// https://crbug.com/843467. // https://crbug.com/843467.
#if !defined(OS_CHROMEOS) #if !defined(OS_CHROMEOS)
// Non-browser processes must be profiled with a command line flag, since // Non-browser processes must be profiled with a command line flag, since
// otherwise, profiling will start after the relevant processes have been // otherwise, profiling will start after the relevant processes have been
// created, thus that process will be not be profiled. // created, thus that process will be not be profiled.
std::vector<Mode> command_line_start_modes; std::vector<Mode> command_line_start_modes;
command_line_start_modes.push_back(Mode::kAll); command_line_start_modes.push_back(Mode::kAll);
command_line_start_modes.push_back(Mode::kAllRenderers); command_line_start_modes.push_back(Mode::kAllRenderers);
for (const auto& mode : command_line_start_modes) { for (const auto& mode : command_line_start_modes) {
for (const auto& stack_mode : stack_modes) { for (const auto& stack_mode : stack_modes) {
params.push_back({mode, stack_mode, true /* stream_samples */, params.push_back({mode, stack_mode, stream_samples,
true /* start_profiling_with_command_line_flag */, true /* start_profiling_with_command_line_flag */,
false /* should_sample */, true /* should_sample */,
false /* sample_everything*/}); false /* sample_everything*/});
}
} }
}
#endif // defined(OS_CHROMEOS) #endif // defined(OS_CHROMEOS)
}
// Test sampling all allocations.
params.push_back({Mode::kBrowser, mojom::StackMode::NATIVE_WITH_THREAD_NAMES,
false /* stream_samples */,
false /* start_profiling_with_command_line_flag */,
true /* should_sample */, true /* sample_everything*/});
// Test sampling some allocations.
params.push_back({Mode::kBrowser, mojom::StackMode::PSEUDO,
false /* stream_samples */,
false /* start_profiling_with_command_line_flag */,
true /* should_sample */, false /* sample_everything*/});
// Test thread names for native profiling.
params.push_back({Mode::kBrowser, mojom::StackMode::NATIVE_WITH_THREAD_NAMES,
false /* stream_samples */,
false /* start_profiling_with_command_line_flag */});
// Profile all utility processes and the browser process. The main goal is
// to check that there is no deadlock in the profiling process.
params.push_back({Mode::kUtilityAndBrowser,
mojom::StackMode::NATIVE_WITH_THREAD_NAMES,
false /* stream_samples */,
false /* start_profiling_with_command_line_flag */,
true /* should_sample */, false /* sample_everything*/});
return params; return params;
} }
......
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