Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(275)

Unified Diff: third_party/leveldatabase/env_chromium.cc

Issue 13838003: Histogram failure reasons for 3 more LevelDB env methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move line around Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/leveldatabase/env_chromium.cc
diff --git a/third_party/leveldatabase/env_chromium.cc b/third_party/leveldatabase/env_chromium.cc
index d4bb927fca8b3f5cf70e5aac959b51857f86012a..6ecdfb13b80ed20dcaba138fc0eea7f06467b4e8 100644
--- a/third_party/leveldatabase/env_chromium.cc
+++ b/third_party/leveldatabase/env_chromium.cc
@@ -340,8 +340,9 @@ class ChromiumWritableFile : public WritableFile {
virtual Status Flush() {
Status result;
if (HANDLE_EINTR(fflush_unlocked(file_))) {
- result = Status::IOError(filename_, strerror(errno));
- uma_logger_->RecordErrorAt(kWritableFileFlush);
+ int saved_errno = errno;
+ result = Status::IOError(filename_, strerror(saved_errno));
+ uma_logger_->RecordSpecificError(kWritableFileFlush, saved_errno);
}
return result;
}
@@ -382,8 +383,9 @@ class ChromiumEnv : public Env, public UMALogger {
FILE* f = fopen_internal(fname.c_str(), "rb");
if (f == NULL) {
*result = NULL;
- RecordErrorAt(kNewSequentialFile);
- return Status::IOError(fname, strerror(errno));
+ int saved_errno = errno;
+ RecordSpecificError(kNewSequentialFile, saved_errno);
+ return Status::IOError(fname, strerror(saved_errno));
} else {
*result = new ChromiumSequentialFile(fname, f, this);
return Status::OK();
@@ -614,8 +616,9 @@ class ChromiumEnv : public Env, public UMALogger {
FILE* f = fopen_internal(fname.c_str(), "w");
if (f == NULL) {
*result = NULL;
- RecordErrorAt(kNewLogger);
- return Status::IOError(fname, strerror(errno));
+ int saved_errno = errno;
+ RecordSpecificError(kNewLogger, saved_errno);
+ return Status::IOError(fname, strerror(saved_errno));
} else {
if (!sync_parent(fname)) {
fclose(f);
@@ -730,6 +733,9 @@ void ChromiumEnv::InitHistograms(const std::string& uma_title) {
uma_name.append(".");
MakeErrnoHistogram(uma_name, kWritableFileAppend);
+ MakeErrnoHistogram(uma_name, kNewSequentialFile);
+ MakeErrnoHistogram(uma_name, kWritableFileFlush);
+ MakeErrnoHistogram(uma_name, kNewLogger);
MakePlatformFileErrorHistogram(uma_name, kNewRandomAccessFile);
MakePlatformFileErrorHistogram(uma_name, kLockFile);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698