summaryrefslogtreecommitdiffstats
path: root/runtime/mem_map.cc
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2013-11-01 15:18:45 -0700
committerChristopher Ferris <cferris@google.com>2013-11-04 13:46:11 -0800
commit7b5f0cf08f74ff36760a813888779d28a175982d (patch)
tree45d77050651a3423deabe7de7c51d8169f6cfd38 /runtime/mem_map.cc
parente2946917852af9d2ec643c7c987d2bb66cf2f086 (diff)
downloadart-7b5f0cf08f74ff36760a813888779d28a175982d.tar.gz
art-7b5f0cf08f74ff36760a813888779d28a175982d.tar.bz2
art-7b5f0cf08f74ff36760a813888779d28a175982d.zip
Use libbacktrace instead of libcorkscrew.
Also, removed the ignore frames of 2, this was causing threads to chop the lower two frames. The original code assumed that the calls to decode the frame were in the unwind trace, but that's not the case. Change-Id: Ifc0da0227f9114a5b462ef88e038439d58f951e9
Diffstat (limited to 'runtime/mem_map.cc')
-rw-r--r--runtime/mem_map.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/runtime/mem_map.cc b/runtime/mem_map.cc
index 6451d5c51a..7802acc88b 100644
--- a/runtime/mem_map.cc
+++ b/runtime/mem_map.cc
@@ -16,7 +16,7 @@
#include "mem_map.h"
-#include <corkscrew/map_info.h>
+#include <backtrace/backtrace.h>
#include "base/stringprintf.h"
#include "ScopedFd.h"
@@ -32,8 +32,8 @@ namespace art {
#if !defined(NDEBUG)
-static std::ostream& operator<<(std::ostream& os, map_info_t* rhs) {
- for (map_info_t* m = rhs; m != NULL; m = m->next) {
+static std::ostream& operator<<(std::ostream& os, backtrace_map_info_t* rhs) {
+ for (backtrace_map_info_t* m = rhs; m != NULL; m = m->next) {
os << StringPrintf("0x%08x-0x%08x %c%c %s\n",
static_cast<uint32_t>(m->start),
static_cast<uint32_t>(m->end),
@@ -50,8 +50,8 @@ static void CheckMapRequest(byte* addr, size_t byte_count) {
uint32_t base = reinterpret_cast<size_t>(addr);
uint32_t limit = base + byte_count;
- map_info_t* map_info_list = load_map_info_list(getpid());
- for (map_info_t* m = map_info_list; m != NULL; m = m->next) {
+ backtrace_map_info_t* map_info_list = backtrace_create_map_info_list(getpid());
+ for (backtrace_map_info_t* m = map_info_list; m != NULL; m = m->next) {
CHECK(!(base >= m->start && base < m->end) // start of new within old
&& !(limit > m->start && limit < m->end) // end of new within old
&& !(base <= m->start && limit > m->end)) // start/end of new includes all of old
@@ -60,7 +60,7 @@ static void CheckMapRequest(byte* addr, size_t byte_count) {
static_cast<uint32_t>(m->start), static_cast<uint32_t>(m->end), m->name)
<< map_info_list;
}
- free_map_info_list(map_info_list);
+ backtrace_destroy_map_info_list(map_info_list);
}
#else