summaryrefslogtreecommitdiffstats
path: root/third_party/leveldatabase
diff options
context:
space:
mode:
authordgrogan@chromium.org <dgrogan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-09 04:58:10 +0000
committerdgrogan@chromium.org <dgrogan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-09 04:58:10 +0000
commit71c34d4002250050679e0bfc85fa428de3df7851 (patch)
treebf1fcf9efb1f43008a31206edf1aae96fa1f2b07 /third_party/leveldatabase
parent59adb11526935835e809cc1d3c990a10985a0023 (diff)
downloadchromium_src-71c34d4002250050679e0bfc85fa428de3df7851.zip
chromium_src-71c34d4002250050679e0bfc85fa428de3df7851.tar.gz
chromium_src-71c34d4002250050679e0bfc85fa428de3df7851.tar.bz2
Histogram failure reasons for 3 more LevelDB env methods.
This will give us reasons for 6 of the top 7 most common failing methods. RenameFile doesn't have a histogram because base::ReplaceFile only returns a bool. Plumbing an error value is planned. BUG=225051 Review URL: https://chromiumcodereview.appspot.com/13838003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193012 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/leveldatabase')
-rw-r--r--third_party/leveldatabase/env_chromium.cc18
1 files changed, 12 insertions, 6 deletions
diff --git a/third_party/leveldatabase/env_chromium.cc b/third_party/leveldatabase/env_chromium.cc
index d4bb927..6ecdfb1 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);