summaryrefslogtreecommitdiffstats
path: root/services/camera/libcameraservice/camera2/CaptureSequencer.cpp
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2012-09-24 09:46:53 -0700
committerEino-Ville Talvala <etalvala@google.com>2012-09-25 10:35:28 -0700
commit4bb8118816874c696d9f1adab48490df1da365f7 (patch)
tree685c57b06d3faa9750d0e0c2aae5eedb59484a70 /services/camera/libcameraservice/camera2/CaptureSequencer.cpp
parentb6ba2fd0d61a4844c153e17843fbe2c841c4bf57 (diff)
downloadframeworks_av-4bb8118816874c696d9f1adab48490df1da365f7.zip
frameworks_av-4bb8118816874c696d9f1adab48490df1da365f7.tar.gz
frameworks_av-4bb8118816874c696d9f1adab48490df1da365f7.tar.bz2
Camera2: Debug and logging fixes.
- Fix LOG_TAGs to work with standard logcat filtering. - Add ATRACE to Camera2Device - Shorten thread names to fit in 16 characters - Remove some ATRACEs to avoid flooding trace unnecessarily Bug: 7220520 Change-Id: Ief8d677b5c8bb35d94e0f21b11b86505e83169ea
Diffstat (limited to 'services/camera/libcameraservice/camera2/CaptureSequencer.cpp')
-rw-r--r--services/camera/libcameraservice/camera2/CaptureSequencer.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/services/camera/libcameraservice/camera2/CaptureSequencer.cpp b/services/camera/libcameraservice/camera2/CaptureSequencer.cpp
index 6d7c54f..c9498c2 100644
--- a/services/camera/libcameraservice/camera2/CaptureSequencer.cpp
+++ b/services/camera/libcameraservice/camera2/CaptureSequencer.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#define LOG_TAG "Camera2Client::CaptureSequencer"
+#define LOG_TAG "Camera2-CaptureSequencer"
#define ATRACE_TAG ATRACE_TAG_CAMERA
//#define LOG_NDEBUG 0
@@ -169,7 +169,11 @@ bool CaptureSequencer::threadLoop() {
if (client == 0) return false;
if (mCaptureState < ERROR) {
+ CaptureState oldState = mCaptureState;
mCaptureState = (this->*kStateManagers[mCaptureState])(client);
+ if (ATRACE_ENABLED() && oldState != mCaptureState) {
+ ATRACE_INT("cam2_capt_state", mCaptureState);
+ }
} else {
ALOGE("%s: Bad capture state: %s",
__FUNCTION__, kStateNames[mCaptureState]);
@@ -181,7 +185,6 @@ bool CaptureSequencer::threadLoop() {
CaptureSequencer::CaptureState CaptureSequencer::manageIdle(sp<Camera2Client> &client) {
status_t res;
- ATRACE_CALL();
Mutex::Autolock l(mInputMutex);
while (!mStartCapture) {
res = mStartCaptureSignal.waitRelative(mInputMutex,