diff options
author | Mathias Agopian <mathias@google.com> | 2010-12-10 15:37:48 -0800 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2010-12-10 15:37:48 -0800 |
commit | f7d63cf2cbab403b14778ec45839107078e20824 (patch) | |
tree | b476d75af36e5a6fbbd0e1a7161a4fe3598114b0 | |
parent | 957d85ec046651a8b0549b62021079ddcc0b8f53 (diff) | |
download | frameworks_base-f7d63cf2cbab403b14778ec45839107078e20824.zip frameworks_base-f7d63cf2cbab403b14778ec45839107078e20824.tar.gz frameworks_base-f7d63cf2cbab403b14778ec45839107078e20824.tar.bz2 |
dump callstack on Surface use error
Change-Id: I38e260dd47349b9af3a999dda683a083a94be16d
-rw-r--r-- | include/utils/CallStack.h | 2 | ||||
-rw-r--r-- | libs/surfaceflinger_client/Surface.cpp | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/utils/CallStack.h b/include/utils/CallStack.h index c2c8ce5..8817120 100644 --- a/include/utils/CallStack.h +++ b/include/utils/CallStack.h @@ -50,7 +50,7 @@ public: void clear(); - void update(int32_t ignoreDepth=0, int32_t maxDepth=MAX_DEPTH); + void update(int32_t ignoreDepth=1, int32_t maxDepth=MAX_DEPTH); // Dump a stack trace to the log void dump(const char* prefix = 0) const; diff --git a/libs/surfaceflinger_client/Surface.cpp b/libs/surfaceflinger_client/Surface.cpp index 9467a4c..6d82b5d 100644 --- a/libs/surfaceflinger_client/Surface.cpp +++ b/libs/surfaceflinger_client/Surface.cpp @@ -489,6 +489,9 @@ status_t Surface::validate() const LOGE("[Surface] using an invalid surface, " "identity=%u should be %d", mIdentity, identity); + CallStack stack; + stack.update(); + stack.dump("Surface"); return NO_INIT; } @@ -497,6 +500,9 @@ status_t Surface::validate() const if (err != NO_ERROR) { LOGE("surface (identity=%u) is invalid, err=%d (%s)", mIdentity, err, strerror(-err)); + CallStack stack; + stack.update(); + stack.dump("Surface"); return err; } |