0

[gin] Remove some long expired histograms

- Purge code since they haven't been active in a few years.

Bug: 1508059
Change-Id: I85b0529aeceb2faafdaa6f51d723b4485a2a70cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5105691
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1241943}
This commit is contained in:
Dave Tapuska
2024-01-02 16:13:20 +00:00
committed by Chromium LUCI CQ
parent 992afc581c
commit b9272751a7
2 changed files with 1 additions and 34 deletions
gin
tools/metrics/histograms/metadata/v8

@ -152,52 +152,31 @@ base::File OpenV8File(const char* file_name,
// Re-try logic here is motivated by http://crbug.com/479537
// for A/V on Windows (https://support.microsoft.com/en-us/kb/316609).
// These match tools/metrics/histograms.xml
enum OpenV8FileResult {
OPENED = 0,
OPENED_RETRY,
FAILED_IN_USE,
FAILED_OTHER,
MAX_VALUE
};
base::FilePath path;
GetV8FilePath(file_name, &path);
#if BUILDFLAG(IS_ANDROID)
base::File file(base::android::OpenApkAsset(path.value(), region_out));
OpenV8FileResult result = file.IsValid() ? OpenV8FileResult::OPENED
: OpenV8FileResult::FAILED_OTHER;
#else
// Re-try logic here is motivated by http://crbug.com/479537
// for A/V on Windows (https://support.microsoft.com/en-us/kb/316609).
const int kMaxOpenAttempts = 5;
const int kOpenRetryDelayMillis = 250;
OpenV8FileResult result = OpenV8FileResult::FAILED_IN_USE;
int flags = base::File::FLAG_OPEN | base::File::FLAG_READ;
base::File file;
for (int attempt = 0; attempt < kMaxOpenAttempts; attempt++) {
file.Initialize(path, flags);
if (file.IsValid()) {
*region_out = base::MemoryMappedFile::Region::kWholeFile;
if (attempt == 0) {
result = OpenV8FileResult::OPENED;
break;
} else {
result = OpenV8FileResult::OPENED_RETRY;
break;
}
break;
} else if (file.error_details() != base::File::FILE_ERROR_IN_USE) {
result = OpenV8FileResult::FAILED_OTHER;
break;
} else if (kMaxOpenAttempts - 1 != attempt) {
base::PlatformThread::Sleep(base::Milliseconds(kOpenRetryDelayMillis));
}
}
#endif // BUILDFLAG(IS_ANDROID)
UMA_HISTOGRAM_ENUMERATION("V8.Initializer.OpenV8File.Result", result,
OpenV8FileResult::MAX_VALUE);
return file;
}

@ -1138,18 +1138,6 @@ chromium-metrics-reviews@google.com.
</summary>
</histogram>
<histogram name="V8.Initializer.LoadV8Snapshot.Result"
enum="V8InitializerLoadV8SnapshotResult" expires_after="M77">
<owner>oth@chromium.org</owner>
<summary>Results from snapshot loading.</summary>
</histogram>
<histogram name="V8.Initializer.OpenV8File.Result"
enum="V8InitializerOpenV8FileResult" expires_after="2020-05-10">
<owner>oth@chromium.org</owner>
<summary>Results from opening V8 snapshot files.</summary>
</histogram>
<histogram name="V8.LiftoffBailoutReasons" enum="LiftoffBailoutReason"
expires_after="2024-05-12">
<owner>ecmziegler@chromium.org</owner>