For b/3381327: Save 159+ms for every launch of Books, YouTube, Movie Studio...
Before this CL, you will see in the logcat:
698 StopWatch D StopWatch calcFileSHA1 time (us): 159162
698 bcc I File opened. fd=45
698 bcc I File closed. fd=45
698 StopWatch D StopWatch calcFileSHA1 time (us): 19282
...
This CL also cleans up bcc's logcat.
Change-Id: I4e23b459eee0dc77ef186fb761a64d731a721517
diff --git a/lib/bcc/FileHandle.cpp b/lib/bcc/FileHandle.cpp
index db02741..7dcb065 100644
--- a/lib/bcc/FileHandle.cpp
+++ b/lib/bcc/FileHandle.cpp
@@ -54,7 +54,7 @@
continue;
}
- LOGE("Unable to open %s in %s mode. (reason: %s)\n",
+ LOGW("Unable to open %s in %s mode. (reason: %s)\n",
filename, open_mode_str[mode], strerror(errno));
return -1;
@@ -93,11 +93,11 @@
}
// Good, we have open and lock the file correctly.
- LOGI("File opened. fd=%d\n", mFD);
+ LOGV("File opened. fd=%d\n", mFD);
return mFD;
}
- LOGE("Unable to open %s in %s mode.\n", filename, open_mode_str[mode]);
+ LOGW("Unable to open %s in %s mode.\n", filename, open_mode_str[mode]);
return -1;
}
@@ -106,7 +106,7 @@
if (mFD >= 0) {
flock(mFD, LOCK_UN);
::close(mFD);
- LOGI("File closed. fd=%d\n", mFD);
+ LOGV("File closed. fd=%d\n", mFD);
mFD = -1;
}
}