OSDN Git Service

Allow nested instruction counting.
authorAndy McFadden <fadden@android.com>
Fri, 22 Oct 2010 22:26:07 +0000 (15:26 -0700)
committerAndy McFadden <fadden@android.com>
Fri, 22 Oct 2010 22:26:07 +0000 (15:26 -0700)
It is traditional to store counts in variables with more than one
bit of storage.

Also, fixed some of the decorations.

Bug 2863796.

Change-Id: I167d6803e955159e35e75d1e2924754145ea1361

vm/Globals.h
vm/Profile.c

index 5362916..f28aab5 100644 (file)
@@ -637,7 +637,7 @@ struct DvmGlobals {
      * Dalvik instruction counts (256 entries).
      */
     int*        executedInstrCounts;
-    bool        instructionCountEnableCount;
+    int         instructionCountEnableCount;
 
     /*
      * Signal catcher thread (for SIGQUIT).
index 957ef0d..6463dab 100644 (file)
@@ -897,7 +897,7 @@ void dvmEmulatorTraceStop(void)
 /*
  * Start instruction counting.
  */
-void dvmStartInstructionCounting()
+void dvmStartInstructionCounting(void)
 {
 #if defined(WITH_INLINE_PROFILING)
     LOGW("Instruction counting not supported with inline profiling");
@@ -908,9 +908,9 @@ void dvmStartInstructionCounting()
 }
 
 /*
- * Start instruction counting.
+ * Stop instruction counting.
  */
-void dvmStopInstructionCounting()
+void dvmStopInstructionCounting(void)
 {
     if (gDvm.instructionCountEnableCount == 0) {
         LOGE("ERROR: instruction counting not enabled\n");