Reland "Make the coverage config reusable for generic profiling."
This reverts commit 212853047a2ae82b168545a6d0719ef8cf488c5f.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Revert "Make the coverage config reusable for generic profiling."
>
> This reverts commit c7695f63126642368835ec006f9e53fe913607f0.
>
> Reason for revert: Possible reason for win10_chromium_x64_rel_ng failing builds with error:
>
> lld-link: error: undefined symbol: __llvm_profile_dump
> >>> referenced by .\..\..\base\test\clang_profiling.cc:23
> >>> obj/base\base/clang_profiling.obj:(void __cdecl base::WriteClangProfilingProfile(void))
>
> Original change's description:
> > Make the coverage config reusable for generic profiling.
> >
> > Most of the coverage configuration can be re-used for general
> > Clang-based profiling (e.g. the profiling step of a PGO build).
> > This changes most of the |use_clang_coverage| checks to
> > |use_clang_profiling|.
> >
> > The toolchain opt-out option is still limited to the coverage
> > builds (grep for "toolchain_use_clang_coverage" in CodeSearch).
> > I.e. targets built simply with |use_clang_profiling=true| won't
> > be opted out by the clang_code_coverage_wrapper.py script.
> >
> > This CL is a pure refactoring with no functional change.
> > Getting profiling information from the sandboxed renderers work
> > this way:
> > - After creating a new child process the browser will open a
> > profiling file for this process and pass the handle to the
> > child via the SetProfilingProfile Mojo call (see change in
> > content/browser/renderer_host/render_process_host_impl.cc).
> > - This process will used by the LLVM instrumentation to record
> > profiling information.
> > - When terminating, child processes will call
> > WriteClangProfilingProfile to write the data to the profiling
> > data file.
> > - Once all the raw profile data files have been collected,
> > they'll be merged (via the "llvm-profdata" tool) and used.
> >
> > Note that this isn't meant to be enabled into any build that
> > will be shipped to users (a profiling build is usually 10x
> > bigger than a normal build anyway, not really shippable).
> >
> > The goal of this refactoring is to make it possible to reuse
> > this mechanism for the instrumentation step of PGO builds.
> >
> > Bug: 1058979
> > Change-Id: If8321234f6b6f86befd81f6e9e068a342728d605
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2090493
> > Reviewed-by: Will Harris <[email protected]>
> > Reviewed-by: Nico Weber <[email protected]>
> > Reviewed-by: Scott Violet <[email protected]>
> > Reviewed-by: Yuke Liao <[email protected]>
> > Reviewed-by: Sajjad Mirza <[email protected]>
> > Commit-Queue: Sébastien Marchand <[email protected]>
> > Cr-Commit-Position: refs/heads/master@{#749015}
>
> [email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
>
> Change-Id: I6aaf638f6385afe35c488575aac84e3e952b76a3
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1058979
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2096332
> Reviewed-by: Jeevan Shikaram <[email protected]>
> Commit-Queue: Jeevan Shikaram <[email protected]>
> Cr-Commit-Position: refs/heads/master@{#749040}
[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1058979
Change-Id: I5492c81b707e5741bd7c494893e3bc7953221263
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2097305
Reviewed-by: Sébastien Marchand <[email protected]>
Reviewed-by: Scott Violet <[email protected]>
Reviewed-by: Will Harris <[email protected]>
Reviewed-by: Yuke Liao <[email protected]>
Commit-Queue: Sébastien Marchand <[email protected]>
Cr-Commit-Position: refs/heads/master@{#749185}
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index e10cad9..962d24e 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -43,7 +43,7 @@
deps = [
"//base",
"//base:base_static",
- "//base:clang_coverage_buildflags",
+ "//base:clang_profiling_buildflags",
"//base/third_party/dynamic_annotations",
"//build:branding_buildflags",
"//cc",