summaryrefslogtreecommitdiffstats
path: root/vm/Init.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'vm/Init.cpp')
-rw-r--r--vm/Init.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/vm/Init.cpp b/vm/Init.cpp
index 48cc6c1c5..7254af9f2 100644
--- a/vm/Init.cpp
+++ b/vm/Init.cpp
@@ -1165,6 +1165,12 @@ static void blockSignals()
cc = sigaction(SIGBUS, &sa, NULL);
assert(cc == 0);
}
+#ifdef NDEBUG
+ // assert() is defined to nothing - resulting in
+ // cc: variable defined but not used (which breaks
+ // the build if -Werror is on)
+ (void)cc;
+#endif
}
class ScopedShutdown {
@@ -1465,10 +1471,12 @@ static bool initZygote()
*/
bool dvmInitAfterZygote()
{
+#ifndef LOG_NDEBUG
u8 startHeap, startQuit, startJdwp;
u8 endHeap, endQuit, endJdwp;
startHeap = dvmGetRelativeTimeUsec();
+#endif
/*
* Post-zygote heap initialization, including starting
@@ -1477,8 +1485,10 @@ bool dvmInitAfterZygote()
if (!dvmGcStartupAfterZygote())
return false;
+#ifndef LOG_NDEBUG
endHeap = dvmGetRelativeTimeUsec();
startQuit = dvmGetRelativeTimeUsec();
+#endif
/* start signal catcher thread that dumps stacks on SIGQUIT */
if (!gDvm.reduceSignals && !gDvm.noQuitHandler) {
@@ -1492,8 +1502,10 @@ bool dvmInitAfterZygote()
return false;
}
+#ifndef LOG_NDEBUG
endQuit = dvmGetRelativeTimeUsec();
startJdwp = dvmGetRelativeTimeUsec();
+#endif
/*
* Start JDWP thread. If the command-line debugger flags specified
@@ -1504,7 +1516,9 @@ bool dvmInitAfterZygote()
ALOGD("JDWP init failed; continuing anyway");
}
+#ifndef LOG_NDEBUG
endJdwp = dvmGetRelativeTimeUsec();
+#endif
ALOGV("thread-start heap=%d quit=%d jdwp=%d total=%d usec",
(int)(endHeap-startHeap), (int)(endQuit-startQuit),