Merge "system: libdiskconfig: Add libdiskconfig"
diff --git a/debuggerd/Android.mk b/debuggerd/Android.mk
index b86f2a5..3c1cf02 100644
--- a/debuggerd/Android.mk
+++ b/debuggerd/Android.mk
@@ -9,6 +9,13 @@
LOCAL_CFLAGS := -Wall
LOCAL_MODULE := debuggerd
+ifeq ($(ARCH_ARM_HAVE_VFP),true)
+LOCAL_CFLAGS += -DWITH_VFP
+endif # ARCH_ARM_HAVE_VFP
+ifeq ($(ARCH_ARM_HAVE_VFP_D32),true)
+LOCAL_CFLAGS += -DWITH_VFP_D32
+endif # ARCH_ARM_HAVE_VFP_D32
+
LOCAL_STATIC_LIBRARIES := libcutils libc
include $(BUILD_EXECUTABLE)
@@ -23,14 +30,20 @@
LOCAL_SHARED_LIBRARIES := libcutils libc
include $(BUILD_EXECUTABLE)
-ifeq ($(TARGET_ARCH_VARIANT),armv7-a)
+ifeq ($(ARCH_ARM_HAVE_VFP),true)
include $(CLEAR_VARS)
+
+LOCAL_CFLAGS += -DWITH_VFP
+ifeq ($(ARCH_ARM_HAVE_VFP_D32),true)
+LOCAL_CFLAGS += -DWITH_VFP_D32
+endif # ARCH_ARM_HAVE_VFP_D32
+
LOCAL_SRC_FILES := vfp-crasher.c vfp.S
LOCAL_MODULE := vfp-crasher
LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
LOCAL_MODULE_TAGS := eng
LOCAL_SHARED_LIBRARIES := libcutils libc
include $(BUILD_EXECUTABLE)
-endif # TARGET_ARCH_VARIANT == armv7-a
+endif # ARCH_ARM_HAVE_VFP == true
endif # TARGET_ARCH == arm
diff --git a/debuggerd/debuggerd.c b/debuggerd/debuggerd.c
index 7b987cf..e850a2e 100644
--- a/debuggerd/debuggerd.c
+++ b/debuggerd/debuggerd.c
@@ -42,6 +42,14 @@
#include "utility.h"
+#ifdef WITH_VFP
+#ifdef WITH_VFP_D32
+#define NUM_VFP_REGS 32
+#else
+#define NUM_VFP_REGS 16
+#endif
+#endif
+
/* Main entry point to get the backtrace from the crashing process */
extern int unwind_backtrace_with_ptrace(int tfd, pid_t pid, mapinfo *map,
unsigned int sp_list[],
@@ -278,7 +286,7 @@
" ip %08x sp %08x lr %08x pc %08x cpsr %08x\n",
r.ARM_ip, r.ARM_sp, r.ARM_lr, r.ARM_pc, r.ARM_cpsr);
-#if __ARM_NEON__
+#ifdef WITH_VFP
struct user_vfp vfp_regs;
int i;
@@ -288,7 +296,7 @@
return;
}
- for (i = 0; i < 32; i += 2) {
+ for (i = 0; i < NUM_VFP_REGS; i += 2) {
_LOG(tfd, only_in_tombstone,
" d%-2d %016llx d%-2d %016llx\n",
i, vfp_regs.fpregs[i], i+1, vfp_regs.fpregs[i+1]);
diff --git a/debuggerd/vfp.S b/debuggerd/vfp.S
index 2192415..9744f6f 100644
--- a/debuggerd/vfp.S
+++ b/debuggerd/vfp.S
@@ -19,6 +19,7 @@
fconstd d13, #13
fconstd d14, #14
fconstd d15, #15
+#ifdef WITH_VFP_D32
fconstd d16, #16
fconstd d17, #17
fconstd d18, #18
@@ -35,6 +36,7 @@
fconstd d29, #29
fconstd d30, #30
fconstd d31, #31
+#endif
mov r0, #0
str r0, [r0]
bx lr
diff --git a/fastboot/engine.c b/fastboot/engine.c
index 4c7e197..6d62c6e 100644
--- a/fastboot/engine.c
+++ b/fastboot/engine.c
@@ -30,9 +30,17 @@
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
+#include <sys/time.h>
#include "fastboot.h"
+double now()
+{
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+ return (double)tv.tv_sec + (double)tv.tv_usec / 1000000;
+}
+
char *mkmsg(const char *fmt, ...)
{
char buf[256];
@@ -66,6 +74,8 @@
const char *msg;
int (*func)(Action *a, int status, char *resp);
+
+ double start;
};
static Action *action_list = 0;
@@ -76,7 +86,9 @@
if (status) {
fprintf(stderr,"FAILED (%s)\n", resp);
} else {
- fprintf(stderr,"OKAY\n");
+ double split = now();
+ fprintf(stderr,"OKAY [%7.3fs]\n", (split - a->start));
+ a->start = split;
}
return status;
}
@@ -101,6 +113,9 @@
action_last = a;
a->op = op;
a->func = cb_default;
+
+ a->start = -1;
+
return a;
}
@@ -166,7 +181,9 @@
if (invert) yes = !yes;
if (yes) {
- fprintf(stderr,"OKAY\n");
+ double split = now();
+ fprintf(stderr,"OKAY [%7.3fs]\n", (split - a->start));
+ a->start = split;
return 0;
}
@@ -263,9 +280,12 @@
a = action_list;
resp[FB_RESPONSE_SZ] = 0;
+ double start = -1;
for (a = action_list; a; a = a->next) {
+ a->start = now();
+ if (start < 0) start = a->start;
if (a->msg) {
- fprintf(stderr,"%s... ",a->msg);
+ fprintf(stderr,"%30s... ",a->msg);
}
if (a->op == OP_DOWNLOAD) {
status = fb_download_data(usb, a->data, a->size);
@@ -285,5 +305,7 @@
die("bogus action");
}
}
+
+ fprintf(stderr,"finished. total time: %.3fs\n", (now() - start));
}
diff --git a/logcat/event.logtags b/logcat/event.logtags
index 1b38f4c..5e6c256 100644
--- a/logcat/event.logtags
+++ b/logcat/event.logtags
@@ -111,8 +111,6 @@
75003 sqlite_mem_released (Memory released|1|2)
75004 sqlite_db_corrupt (Database file corrupt|3)
-40000 checkin (Check in time|2|3)
-
50000 menu_item_selected (Menu type where 0 is options and 1 is context|1|5),(Menu item title|3)
50001 menu_opened (Menu type where 0 is options and 1 is context|1|5)