Merge "Do not do local unwinds through .oat or .dex maps." into nyc-dev

am: bb7ed0141b

* commit 'bb7ed0141b0084c1ef3496fb9fbc820563a53329':
  Do not do local unwinds through .oat or .dex maps.
This commit is contained in:
Christopher Ferris 2016-03-02 03:50:35 +00:00 committed by android-build-merger
commit a172783680
1 changed files with 11 additions and 0 deletions

View File

@ -23,6 +23,7 @@
#define UNW_LOCAL_ONLY
#include <libunwind.h>
#include <android-base/strings.h>
#include <backtrace/Backtrace.h>
#include "BacktraceLog.h"
@ -124,6 +125,16 @@ bool UnwindCurrent::UnwindFromContext(size_t num_ignore_frames, ucontext_t* ucon
num_ignore_frames--;
}
}
// For now, do not attempt to do local unwinds through .dex, or .oat
// maps. We can only unwind through these if there is a compressed
// section available, almost all local unwinds are done by ART
// which will dump the Java frames separately.
// TODO: Come up with a flag to control this.
if (android::base::EndsWith(frame->map.name, ".dex")
|| android::base::EndsWith(frame->map.name, ".oat")) {
break;
}
ret = unw_step (cursor.get());
} while (ret > 0 && num_frames < MAX_BACKTRACE_FRAMES);