[etw tracing] Include tracing_service in the Windows installer
The service is included in the installer and is updated if it is already installed. A subsequent CL will install the service for dev channel installs. In the meantime, users and developers may manually install the service following the instructions in chrome/windows_services/elevated_tracing_service/README.md. Bug: 41497361 Change-Id: Idafd2eb9b0f239ac9c5e66554b7ebd7541ae1cb3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5891213 Reviewed-by: Struan Shrimpton <sshrimp@google.com> Reviewed-by: Dirk Pranke <dpranke@google.com> Reviewed-by: S Ganesh <ganesh@chromium.org> Reviewed-by: Etienne Pierre-Doray <etiennep@chromium.org> Commit-Queue: Greg Thompson <grt@chromium.org> Cr-Commit-Position: refs/heads/main@{#1391000}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
42fd056490
commit
6749d0ce45
3
BUILD.gn
3
BUILD.gn
@@ -359,9 +359,6 @@ group("gn_all") {
|
|||||||
deps += [
|
deps += [
|
||||||
"//chrome/credential_provider",
|
"//chrome/credential_provider",
|
||||||
"//chrome/credential_provider/test:gcp_unittests",
|
"//chrome/credential_provider/test:gcp_unittests",
|
||||||
|
|
||||||
# TODO(grt): Remove when chrome depends on the service.
|
|
||||||
"//chrome/windows_services/elevated_tracing_service",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if (enable_platform_experience) {
|
if (enable_platform_experience) {
|
||||||
|
@@ -245,6 +245,7 @@ if (!is_android && !is_mac) {
|
|||||||
"//chrome/chrome_proxy",
|
"//chrome/chrome_proxy",
|
||||||
"//chrome/elevation_service",
|
"//chrome/elevation_service",
|
||||||
"//chrome/notification_helper",
|
"//chrome/notification_helper",
|
||||||
|
"//chrome/windows_services/elevated_tracing_service",
|
||||||
]
|
]
|
||||||
|
|
||||||
if (enable_platform_experience) {
|
if (enable_platform_experience) {
|
||||||
|
@@ -72,7 +72,7 @@ ffmpeg.dll: %(VersionDir)s\
|
|||||||
[TOUCH]
|
[TOUCH]
|
||||||
|
|
||||||
[GOOGLE_CHROME]
|
[GOOGLE_CHROME]
|
||||||
# The elevation service is only installed for Google Chrome builds.
|
elevated_tracing_service.exe: %(VersionDir)s\
|
||||||
elevation_service.exe: %(VersionDir)s\
|
elevation_service.exe: %(VersionDir)s\
|
||||||
os_update_handler.exe: %(VersionDir)s\
|
os_update_handler.exe: %(VersionDir)s\
|
||||||
|
|
||||||
|
@@ -320,6 +320,36 @@ void AddElevationServiceWorkItems(const base::FilePath& elevation_service_path,
|
|||||||
list->AddWorkItem(install_service_work_item);
|
list->AddWorkItem(install_service_work_item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Adds work items to register the Tracing Service with Windows if it is
|
||||||
|
// already installed.
|
||||||
|
void AddTracingServiceWorkItems(const base::FilePath& tracing_service_path,
|
||||||
|
WorkItemList* list) {
|
||||||
|
DCHECK(::IsUserAnAdmin());
|
||||||
|
|
||||||
|
if (tracing_service_path.empty()) {
|
||||||
|
LOG(DFATAL) << "The path to tracing_service.exe is invalid.";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO(grt): Change this condition so that the service is unconditionally
|
||||||
|
// installed for dev channel and otherwise updated if it is already installed.
|
||||||
|
const CLSID clsid = install_static::GetTracingServiceClsid();
|
||||||
|
if (!InstallServiceWorkItem::IsComServiceInstalled(clsid)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
WorkItem* install_service_work_item = new InstallServiceWorkItem(
|
||||||
|
install_static::GetTracingServiceName(),
|
||||||
|
install_static::GetTracingServiceDisplayName(),
|
||||||
|
GetLocalizedString(IDS_TRACING_SERVICE_DESCRIPTION_BASE),
|
||||||
|
SERVICE_DEMAND_START, base::CommandLine(tracing_service_path),
|
||||||
|
base::CommandLine(base::CommandLine::NO_PROGRAM),
|
||||||
|
install_static::GetClientStateKeyPath(), {clsid},
|
||||||
|
{install_static::GetTracingServiceIid()});
|
||||||
|
install_service_work_item->set_best_effort(true);
|
||||||
|
list->AddWorkItem(install_service_work_item);
|
||||||
|
}
|
||||||
|
|
||||||
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||||
// Adds work items to add the "store-dmtoken" command to Chrome's version key.
|
// Adds work items to add the "store-dmtoken" command to Chrome's version key.
|
||||||
// This method is a no-op if this is anything other than system-level Chrome.
|
// This method is a no-op if this is anything other than system-level Chrome.
|
||||||
@@ -1202,11 +1232,16 @@ void AddFinalizeUpdateWorkItems(const base::Version& new_version,
|
|||||||
// overwriting any of the following post-install tasks.
|
// overwriting any of the following post-install tasks.
|
||||||
AddDowngradeCleanupItems(new_version, list);
|
AddDowngradeCleanupItems(new_version, list);
|
||||||
|
|
||||||
|
const base::FilePath target_path = installer_state.target_path();
|
||||||
AddOldWerHelperRegistrationCleanupItems(installer_state.root_key(),
|
AddOldWerHelperRegistrationCleanupItems(installer_state.root_key(),
|
||||||
installer_state.target_path(), list);
|
target_path, list);
|
||||||
AddWerHelperRegistration(
|
AddWerHelperRegistration(installer_state.root_key(),
|
||||||
installer_state.root_key(),
|
GetWerHelperPath(target_path, new_version), list);
|
||||||
GetWerHelperPath(installer_state.target_path(), new_version), list);
|
|
||||||
|
if (installer_state.system_install()) {
|
||||||
|
AddTracingServiceWorkItems(GetTracingServicePath(target_path, new_version),
|
||||||
|
list);
|
||||||
|
}
|
||||||
|
|
||||||
const std::wstring client_state_key = install_static::GetClientStateKeyPath();
|
const std::wstring client_state_key = install_static::GetClientStateKeyPath();
|
||||||
|
|
||||||
|
@@ -914,4 +914,15 @@ FILES = [
|
|||||||
'buildtype': ['official'],
|
'buildtype': ['official'],
|
||||||
'archive': 'hyphens-data.zip',
|
'archive': 'hyphens-data.zip',
|
||||||
},
|
},
|
||||||
|
# Tracing service files:
|
||||||
|
{
|
||||||
|
'filename': 'elevated_tracing_service.exe',
|
||||||
|
'buildtype': ['official'],
|
||||||
|
'filegroup': ['default'],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'filename': 'elevated_tracing_service.exe.pdb',
|
||||||
|
'buildtype': ['official'],
|
||||||
|
'archive': 'chrome-win32-syms.zip',
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
@@ -13,6 +13,7 @@
|
|||||||
"D3DCompiler_47.dll",
|
"D3DCompiler_47.dll",
|
||||||
"dxcompiler.dll",
|
"dxcompiler.dll",
|
||||||
"dxil.dll",
|
"dxil.dll",
|
||||||
|
"elevated_tracing_service.exe",
|
||||||
"elevation_service.exe",
|
"elevation_service.exe",
|
||||||
"eventlog_provider.dll",
|
"eventlog_provider.dll",
|
||||||
"First Run",
|
"First Run",
|
||||||
@@ -58,6 +59,7 @@
|
|||||||
"chrome_proxy.exe.pdb",
|
"chrome_proxy.exe.pdb",
|
||||||
"chrome_pwa_launcher.exe.pdb",
|
"chrome_pwa_launcher.exe.pdb",
|
||||||
"chrome_wer.dll.pdb",
|
"chrome_wer.dll.pdb",
|
||||||
|
"elevated_tracing_service.exe.pdb",
|
||||||
"elevation_service.exe.pdb",
|
"elevation_service.exe.pdb",
|
||||||
"eventlog_provider.dll.pdb",
|
"eventlog_provider.dll.pdb",
|
||||||
"gaia1_0.dll.pdb",
|
"gaia1_0.dll.pdb",
|
||||||
|
@@ -13,6 +13,7 @@
|
|||||||
"D3DCompiler_47.dll",
|
"D3DCompiler_47.dll",
|
||||||
"dxcompiler.dll",
|
"dxcompiler.dll",
|
||||||
"dxil.dll",
|
"dxil.dll",
|
||||||
|
"elevated_tracing_service.exe",
|
||||||
"elevation_service.exe",
|
"elevation_service.exe",
|
||||||
"eventlog_provider.dll",
|
"eventlog_provider.dll",
|
||||||
"First Run",
|
"First Run",
|
||||||
@@ -58,6 +59,7 @@
|
|||||||
"chrome_proxy.exe.pdb",
|
"chrome_proxy.exe.pdb",
|
||||||
"chrome_pwa_launcher.exe.pdb",
|
"chrome_pwa_launcher.exe.pdb",
|
||||||
"chrome_wer.dll.pdb",
|
"chrome_wer.dll.pdb",
|
||||||
|
"elevated_tracing_service.exe.pdb",
|
||||||
"elevation_service.exe.pdb",
|
"elevation_service.exe.pdb",
|
||||||
"eventlog_provider.dll.pdb",
|
"eventlog_provider.dll.pdb",
|
||||||
"gaia1_0.dll.pdb",
|
"gaia1_0.dll.pdb",
|
||||||
|
@@ -13,6 +13,7 @@
|
|||||||
"D3DCompiler_47.dll",
|
"D3DCompiler_47.dll",
|
||||||
"dxcompiler.dll",
|
"dxcompiler.dll",
|
||||||
"dxil.dll",
|
"dxil.dll",
|
||||||
|
"elevated_tracing_service.exe",
|
||||||
"elevation_service.exe",
|
"elevation_service.exe",
|
||||||
"eventlog_provider.dll",
|
"eventlog_provider.dll",
|
||||||
"First Run",
|
"First Run",
|
||||||
@@ -58,6 +59,7 @@
|
|||||||
"chrome_proxy.exe.pdb",
|
"chrome_proxy.exe.pdb",
|
||||||
"chrome_pwa_launcher.exe.pdb",
|
"chrome_pwa_launcher.exe.pdb",
|
||||||
"chrome_wer.dll.pdb",
|
"chrome_wer.dll.pdb",
|
||||||
|
"elevated_tracing_service.exe.pdb",
|
||||||
"elevation_service.exe.pdb",
|
"elevation_service.exe.pdb",
|
||||||
"eventlog_provider.dll.pdb",
|
"eventlog_provider.dll.pdb",
|
||||||
"gaia1_0.dll.pdb",
|
"gaia1_0.dll.pdb",
|
||||||
|
@@ -369,6 +369,7 @@ def main_win(output_directory, results_collector, size_path):
|
|||||||
'chrome_elf.dll',
|
'chrome_elf.dll',
|
||||||
'chrome_proxy.exe',
|
'chrome_proxy.exe',
|
||||||
'chrome_watcher.dll',
|
'chrome_watcher.dll',
|
||||||
|
'elevated_tracing_service.exe',
|
||||||
'elevation_service.exe',
|
'elevation_service.exe',
|
||||||
'libEGL.dll',
|
'libEGL.dll',
|
||||||
'libGLESv2.dll',
|
'libGLESv2.dll',
|
||||||
|
@@ -47,6 +47,7 @@ CETCOMPAT_NOT_REQUIRED = [
|
|||||||
'chrome_proxy.exe',
|
'chrome_proxy.exe',
|
||||||
'chrome_pwa_launcher.exe',
|
'chrome_pwa_launcher.exe',
|
||||||
'dxcompiler.dll', # TODO(crbug.com/40927190)
|
'dxcompiler.dll', # TODO(crbug.com/40927190)
|
||||||
|
'elevated_tracing_service.exe',
|
||||||
'elevation_service.exe',
|
'elevation_service.exe',
|
||||||
'nacl64.exe',
|
'nacl64.exe',
|
||||||
'notification_helper.exe',
|
'notification_helper.exe',
|
||||||
|
Reference in New Issue
Block a user