diff options
| author | Carl Shapiro <cshapiro@google.com> | 2011-01-31 18:07:58 -0800 |
|---|---|---|
| committer | Carl Shapiro <cshapiro@google.com> | 2011-01-31 18:07:58 -0800 |
| commit | 83ff618a3e5a63b1930ed546c3d2ef194d29d642 (patch) | |
| tree | 8a902312ca7c2fd6912c01c8311d576cd6ca0833 | |
| parent | 19cefdcde26ea31d06cef031032b2ef78013d976 (diff) | |
| download | android_dalvik-83ff618a3e5a63b1930ed546c3d2ef194d29d642.tar.gz android_dalvik-83ff618a3e5a63b1930ed546c3d2ef194d29d642.tar.bz2 android_dalvik-83ff618a3e5a63b1930ed546c3d2ef194d29d642.zip | |
Remove the HPROF stack trace collection feature.
Change-Id: I0eab9c496b07212fb2c86fe122dc422e70af891e
| -rw-r--r-- | vm/Dvm.mk | 7 | ||||
| -rw-r--r-- | vm/Init.c | 3 | ||||
| -rw-r--r-- | vm/alloc/Alloc.c | 12 | ||||
| -rw-r--r-- | vm/hprof/Hprof.c | 13 | ||||
| -rw-r--r-- | vm/hprof/Hprof.h | 27 | ||||
| -rw-r--r-- | vm/hprof/HprofHeap.c | 6 | ||||
| -rw-r--r-- | vm/hprof/HprofStack.c | 266 | ||||
| -rw-r--r-- | vm/hprof/HprofStack.h | 42 | ||||
| -rw-r--r-- | vm/hprof/HprofStackFrame.c | 242 | ||||
| -rw-r--r-- | vm/oo/Array.c | 13 | ||||
| -rw-r--r-- | vm/reflect/Proxy.c | 3 |
11 files changed, 0 insertions, 634 deletions
@@ -231,13 +231,6 @@ ifeq ($(WITH_JIT),true) interp/Jit.c endif -ifeq ($(strip $(WITH_HPROF_STACK)),true) - LOCAL_SRC_FILES += \ - hprof/HprofStack.c \ - hprof/HprofStackFrame.c - LOCAL_CFLAGS += -DWITH_HPROF_STACK=1 -endif # WITH_HPROF_STACK - LOCAL_C_INCLUDES += \ $(JNI_H_INCLUDE) \ dalvik \ @@ -142,9 +142,6 @@ static void usage(const char* progName) " debugger" " profiler" " hprof" -#ifdef WITH_HPROF_STACK - " hprof_stack" -#endif #ifdef WITH_MONITOR_TRACKING " monitor_tracking" #endif diff --git a/vm/alloc/Alloc.c b/vm/alloc/Alloc.c index 35f5e65e6..42156dff5 100644 --- a/vm/alloc/Alloc.c +++ b/vm/alloc/Alloc.c @@ -21,11 +21,6 @@ #include "alloc/HeapInternal.h" #include "alloc/HeapSource.h" -#if WITH_HPROF_STACK -#include "hprof/Hprof.h" -#endif - - /* * Initialize the GC universe. * @@ -184,9 +179,6 @@ Object* dvmAllocObject(ClassObject* clazz, int flags) newObj = (Object*)dvmMalloc(clazz->objectSize, flags); if (newObj != NULL) { DVM_OBJECT_INIT(newObj, clazz); -#if WITH_HPROF_STACK - hprofFillInStackTrace(newObj); -#endif dvmTrackAllocation(clazz, clazz->objectSize); } @@ -227,10 +219,6 @@ Object* dvmCloneObject(Object* obj) copy = (Object*)dvmMalloc(size, flags); if (copy == NULL) return NULL; -#if WITH_HPROF_STACK - hprofFillInStackTrace(copy); - dvmTrackAllocation(obj->clazz, size); -#endif memcpy(copy, obj, size); DVM_LOCK_INIT(©->lock); diff --git a/vm/hprof/Hprof.c b/vm/hprof/Hprof.c index 67090aea7..3f5e3162f 100644 --- a/vm/hprof/Hprof.c +++ b/vm/hprof/Hprof.c @@ -40,10 +40,6 @@ hprofStartup(const char *outputFileName, int fd, bool directToDdms) { hprofStartup_String(); hprofStartup_Class(); -#if WITH_HPROF_STACK - hprofStartup_StackFrame(); - hprofStartup_Stack(); -#endif hprof_context_t *ctx = (hprof_context_t *)malloc(sizeof(*ctx)); if (ctx == NULL) { @@ -93,19 +89,10 @@ hprofShutdown(hprof_context_t *tailCtx) hprofAddU4ToRecord(&headCtx->curRec, HPROF_NULL_THREAD); hprofAddU4ToRecord(&headCtx->curRec, 0); // no frames -#if WITH_HPROF_STACK - hprofDumpStackFrames(headCtx); - hprofDumpStacks(headCtx); -#endif - hprofFlushCurrentRecord(headCtx); hprofShutdown_Class(); hprofShutdown_String(); -#if WITH_HPROF_STACK - hprofShutdown_Stack(); - hprofShutdown_StackFrame(); -#endif /* flush to ensure memstream pointer and size are updated */ fflush(headCtx->memFp); diff --git a/vm/hprof/Hprof.h b/vm/hprof/Hprof.h index f95e2e193..c79a3df0e 100644 --- a/vm/hprof/Hprof.h +++ b/vm/hprof/Hprof.h @@ -31,9 +31,6 @@ typedef u4 hprof_id; typedef hprof_id hprof_string_id; typedef hprof_id hprof_object_id; typedef hprof_id hprof_class_object_id; -#if WITH_HPROF_STACK -typedef hprof_id hprof_stack_frame_id; -#endif typedef enum hprof_basic_type { hprof_basic_object = 2, @@ -217,30 +214,6 @@ int hprofAddU8ListToRecord(hprof_record_t *rec, #define hprofAddIdListToRecord(rec, values, numValues) \ hprofAddU4ListToRecord((rec), (const u4 *)(values), (numValues)) -#if WITH_HPROF_STACK - -/* - * HprofStack.c functions - */ - -void hprofFillInStackTrace(void *objectPtr); - -int hprofDumpStacks(hprof_context_t *ctx); - -int hprofStartup_Stack(void); -int hprofShutdown_Stack(void); - -/* - * HprofStackFrame.c functions - */ - -int hprofDumpStackFrames(hprof_context_t *ctx); - -int hprofStartup_StackFrame(void); -int hprofShutdown_StackFrame(void); - -#endif - /* * Hprof.c functions */ diff --git a/vm/hprof/HprofHeap.c b/vm/hprof/HprofHeap.c index 75a1d2b4e..ee24a7aa1 100644 --- a/vm/hprof/HprofHeap.c +++ b/vm/hprof/HprofHeap.c @@ -214,14 +214,8 @@ hprofMarkRootObject(hprof_context_t *ctx, const Object *obj, jobject jniObj) static int stackTraceSerialNumber(const void *obj) - { -#if WITH_HPROF_STACK - DvmHeapChunk *chunk = ptr2chunk(obj); - return chunk->stackTraceSerialNumber; -#else return HPROF_NULL_STACK_TRACE; -#endif } int diff --git a/vm/hprof/HprofStack.c b/vm/hprof/HprofStack.c deleted file mode 100644 index 04641ef7c..000000000 --- a/vm/hprof/HprofStack.c +++ /dev/null @@ -1,266 +0,0 @@ -/* - * Copyright (C) 2008 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "Hprof.h" -#include "HprofStack.h" -#include "alloc/HeapInternal.h" - -static HashTable *gStackTraceHashTable = NULL; -static int gSerialNumber = 0; - -/* Number of stack frames to cache */ -#define STACK_DEPTH 8 - -typedef struct { - int serialNumber; - int threadSerialNumber; - int frameIds[STACK_DEPTH]; -} StackTrace; - -typedef struct { - StackTrace trace; - u1 live; -} StackTraceEntry; - -static u4 computeStackTraceHash(const StackTraceEntry *stackTraceEntry); - -int -hprofStartup_Stack() -{ - HashIter iter; - - /* This will be called when a GC begins. */ - for (dvmHashIterBegin(gStackTraceHashTable, &iter); - !dvmHashIterDone(&iter); - dvmHashIterNext(&iter)) { - StackTraceEntry *stackTraceEntry; - - /* Clear the 'live' bit at the start of the GC pass. */ - stackTraceEntry = (StackTraceEntry *) dvmHashIterData(&iter); - stackTraceEntry->live = 0; - } - - return 0; -} - -int -hprofShutdown_Stack() -{ - HashIter iter; - - /* This will be called when a GC has completed. */ - for (dvmHashIterBegin(gStackTraceHashTable, &iter); - !dvmHashIterDone(&iter); - dvmHashIterNext(&iter)) { - StackTraceEntry *stackTraceEntry; - - /* - * If the 'live' bit is 0, the trace is not in use by any current - * heap object and may be destroyed. - */ - stackTraceEntry = (StackTraceEntry *) dvmHashIterData(&iter); - if (!stackTraceEntry->live) { - dvmHashTableRemove(gStackTraceHashTable, - computeStackTraceHash(stackTraceEntry), stackTraceEntry); - free(stackTraceEntry); - } - } - - return 0; -} - -static u4 -computeStackTraceHash(const StackTraceEntry *stackTraceEntry) -{ - u4 hash = 0; - const char *cp = (const char *) &stackTraceEntry->trace; - int i; - - for (i = 0; i < (int) sizeof(StackTrace); i++) { - hash = hash * 31 + cp[i]; - } - - return hash; -} - -/* Only compare the 'trace' portion of the StackTraceEntry. */ -static int -stackCmp(const void *tableItem, const void *looseItem) -{ - return memcmp(&((StackTraceEntry *) tableItem)->trace, - &((StackTraceEntry *) looseItem)->trace, sizeof(StackTrace)); -} - -static StackTraceEntry * -stackDup(const StackTraceEntry *stackTrace) -{ - StackTraceEntry *newStackTrace = malloc(sizeof(StackTraceEntry)); - memcpy(newStackTrace, stackTrace, sizeof(StackTraceEntry)); - return newStackTrace; -} - -static u4 -hprofLookupStackSerialNumber(const StackTraceEntry *stackTrace) -{ - StackTraceEntry *val; - u4 hashValue; - int serial; - - /* - * Create the hash table on first contact. We can't do this in - * hprofStartupStack, because we have to compute stack trace - * serial numbers and place them into object headers before the - * rest of hprof is triggered by a GC event. - */ - if (gStackTraceHashTable == NULL) { - gStackTraceHashTable = dvmHashTableCreate(512, free); - } - dvmHashTableLock(gStackTraceHashTable); - - hashValue = computeStackTraceHash(stackTrace); - val = dvmHashTableLookup(gStackTraceHashTable, hashValue, (void *)stackTrace, - (HashCompareFunc)stackCmp, false); - if (val == NULL) { - StackTraceEntry *newStackTrace; - - newStackTrace = stackDup(stackTrace); - newStackTrace->trace.serialNumber = ++gSerialNumber; - val = dvmHashTableLookup(gStackTraceHashTable, hashValue, - (void *)newStackTrace, (HashCompareFunc)stackCmp, true); - assert(val != NULL); - } - - /* Mark the trace as live (in use by an object in the current heap). */ - val->live = 1; - - /* Grab the serial number before unlocking the table. */ - serial = val->trace.serialNumber; - - dvmHashTableUnlock(gStackTraceHashTable); - - return serial; -} - -int -hprofDumpStacks(hprof_context_t *ctx) -{ - HashIter iter; - hprof_record_t *rec = &ctx->curRec; - - dvmHashTableLock(gStackTraceHashTable); - - for (dvmHashIterBegin(gStackTraceHashTable, &iter); - !dvmHashIterDone(&iter); - dvmHashIterNext(&iter)) - { - const StackTraceEntry *stackTraceEntry; - int count; - int i; - - hprofStartNewRecord(ctx, HPROF_TAG_STACK_TRACE, HPROF_TIME); - - stackTraceEntry = (const StackTraceEntry *) dvmHashIterData(&iter); - assert(stackTraceEntry != NULL); - - /* STACK TRACE format: - * - * u4: serial number for this stack - * u4: serial number for the running thread - * u4: number of frames - * [ID]*: ID for the stack frame - */ - hprofAddU4ToRecord(rec, stackTraceEntry->trace.serialNumber); - hprofAddU4ToRecord(rec, stackTraceEntry->trace.threadSerialNumber); - - count = 0; - while ((count < STACK_DEPTH) && - (stackTraceEntry->trace.frameIds[count] != 0)) { - count++; - } - hprofAddU4ToRecord(rec, count); - for (i = 0; i < count; i++) { - hprofAddU4ToRecord(rec, stackTraceEntry->trace.frameIds[i]); - } - } - - dvmHashTableUnlock(gStackTraceHashTable); - - return 0; -} - -void -hprofFillInStackTrace(void *objectPtr) - -{ - DvmHeapChunk *chunk; - StackTraceEntry stackTraceEntry; - Thread* self; - void* fp; - int i; - - if (objectPtr == NULL) { - return; - } - self = dvmThreadSelf(); - if (self == NULL) { - return; - } - fp = self->curFrame; - - /* Serial number to be filled in later. */ - stackTraceEntry.trace.serialNumber = -1; - - /* - * TODO - The HAT tool doesn't care about thread data, so we can defer - * actually emitting thread records and assigning thread serial numbers. - */ - stackTraceEntry.trace.threadSerialNumber = (int) self; - - memset(&stackTraceEntry.trace.frameIds, 0, - sizeof(stackTraceEntry.trace.frameIds)); - - i = 0; - while ((fp != NULL) && (i < STACK_DEPTH)) { - const StackSaveArea* saveArea = SAVEAREA_FROM_FP(fp); - const Method* method = saveArea->method; - StackFrameEntry frame; - - if (!dvmIsBreakFrame(fp)) { - frame.frame.method = method; - if (dvmIsNativeMethod(method)) { - frame.frame.pc = 0; /* no saved PC for native methods */ - } else { - assert(saveArea->xtra.currentPc >= method->insns && - saveArea->xtra.currentPc < - method->insns + dvmGetMethodInsnsSize(method)); - frame.frame.pc = (int) (saveArea->xtra.currentPc - - method->insns); - } - - // Canonicalize the frame and cache it in the hprof context - stackTraceEntry.trace.frameIds[i++] = - hprofLookupStackFrameId(&frame); - } - - assert(fp != saveArea->prevFrame); - fp = saveArea->prevFrame; - } - - /* Store the stack trace serial number in the object header */ - chunk = ptr2chunk(objectPtr); - chunk->stackTraceSerialNumber = - hprofLookupStackSerialNumber(&stackTraceEntry); -} diff --git a/vm/hprof/HprofStack.h b/vm/hprof/HprofStack.h deleted file mode 100644 index 1f16c1e6a..000000000 --- a/vm/hprof/HprofStack.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2008 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef _DALVIK_HPROF_STACK -#define _DALVIK_HPROF_STACK - -#include "../alloc/HeapInternal.h" - -typedef struct { - const Method *method; - int pc; -} StackFrame; - -typedef struct { - StackFrame frame; - unsigned char live; -} StackFrameEntry; - -int hprofStartupStack(); -int hprofShutdown_Stack(); -int hprofDumpStacks(hprof_context_t *ctx); -void hprofFillInStackTrace(void *objectPtr); - -int hprofStartup_StackFrame(); -int hprofShutdown_StackFrame(); -hprof_stack_frame_id hprofLookupStackFrameId(const StackFrameEntry - *stackFrameEntry); -int hprofDumpStackFrames(hprof_context_t *ctx); - -#endif /* _DALVIK_HPROF_STACK */ diff --git a/vm/hprof/HprofStackFrame.c b/vm/hprof/HprofStackFrame.c deleted file mode 100644 index f9c789e88..000000000 --- a/vm/hprof/HprofStackFrame.c +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Copyright (C) 2008 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "Hprof.h" -#include "HprofStack.h" - -#include "alloc/HeapInternal.h" - -static HashTable *gStackFrameHashTable; - -static u4 computeStackFrameHash(const StackFrameEntry *stackFrameEntry); - -int -hprofStartup_StackFrame() -{ - HashIter iter; - - /* Cache the string "<unknown>" for use when the source file is - * unknown. - */ - hprofLookupStringId("<unknown>"); - - /* This will be called when a GC begins. */ - for (dvmHashIterBegin(gStackFrameHashTable, &iter); - !dvmHashIterDone(&iter); - dvmHashIterNext(&iter)) { - StackFrameEntry *stackFrameEntry; - const Method *method; - - /* Clear the 'live' bit at the start of the GC pass. */ - stackFrameEntry = (StackFrameEntry *) dvmHashIterData(&iter); - stackFrameEntry->live = 0; - - method = stackFrameEntry->frame.method; - if (method == NULL) { - continue; - } - - /* Make sure the method name, descriptor, and source file are in - * the string table, and that the method class is in the class - * table. This is needed because strings and classes will be dumped - * before stack frames. - */ - - if (method->name) { - hprofLookupStringId(method->name); - } - - DexStringCache cache; - const char* descriptor; - - dexStringCacheInit(&cache); - descriptor = dexProtoGetMethodDescriptor(&method->prototype, &cache); - hprofLookupStringId(descriptor); - dexStringCacheRelease(&cache); - - const char* sourceFile = dvmGetMethodSourceFile(method); - if (sourceFile) { - hprofLookupStringId(sourceFile); - } - - if (method->clazz) { - hprofLookupClassId(method->clazz); - } - } - - return 0; -} - -int -hprofShutdown_StackFrame() -{ - HashIter iter; - - /* This will be called when a GC has completed. */ - for (dvmHashIterBegin(gStackFrameHashTable, &iter); - !dvmHashIterDone(&iter); - dvmHashIterNext(&iter)) { - const StackFrameEntry *stackFrameEntry; - - /* - * If the 'live' bit is 0, the frame is not in use by any current - * heap object and may be destroyed. - */ - stackFrameEntry = (const StackFrameEntry *) dvmHashIterData(&iter); - if (!stackFrameEntry->live) { - dvmHashTableRemove(gStackFrameHashTable, - computeStackFrameHash(stackFrameEntry), - (void*) stackFrameEntry); - free((void*) stackFrameEntry); - } - } - - return 0; -} - -/* Only hash the 'frame' portion of the StackFrameEntry. */ -static u4 -computeStackFrameHash(const StackFrameEntry *stackFrameEntry) -{ - u4 hash = 0; - const char *cp = (char *) &stackFrameEntry->frame; - int i; - - for (i = 0; i < (int) sizeof(StackFrame); i++) { - hash = 31 * hash + cp[i]; - } - return hash; -} - -/* Only compare the 'frame' portion of the StackFrameEntry. */ -static int -stackFrameCmp(const void *tableItem, const void *looseItem) -{ - return memcmp(&((StackFrameEntry *)tableItem)->frame, - &((StackFrameEntry *) looseItem)->frame, sizeof(StackFrame)); -} - -static StackFrameEntry * -stackFrameDup(const StackFrameEntry *stackFrameEntry) -{ - StackFrameEntry *newStackFrameEntry = malloc(sizeof(StackFrameEntry)); - memcpy(newStackFrameEntry, stackFrameEntry, sizeof(StackFrameEntry)); - return newStackFrameEntry; -} - -hprof_stack_frame_id -hprofLookupStackFrameId(const StackFrameEntry *stackFrameEntry) -{ - StackFrameEntry *val; - u4 hashValue; - - /* - * Create the hash table on first contact. We can't do this in - * hprofStartupStackFrame, because we have to compute stack trace - * serial numbers and place them into object headers before the - * rest of hprof is triggered by a GC event. - */ - if (gStackFrameHashTable == NULL) { - gStackFrameHashTable = dvmHashTableCreate(512, free); - } - dvmHashTableLock(gStackFrameHashTable); - - hashValue = computeStackFrameHash(stackFrameEntry); - val = dvmHashTableLookup(gStackFrameHashTable, hashValue, - (void *)stackFrameEntry, (HashCompareFunc)stackFrameCmp, false); - if (val == NULL) { - const StackFrameEntry *newStackFrameEntry; - - newStackFrameEntry = stackFrameDup(stackFrameEntry); - val = dvmHashTableLookup(gStackFrameHashTable, hashValue, - (void *)newStackFrameEntry, (HashCompareFunc)stackFrameCmp, true); - assert(val != NULL); - } - - /* Mark the frame as live (in use by an object in the current heap). */ - val->live = 1; - - dvmHashTableUnlock(gStackFrameHashTable); - - return (hprof_stack_frame_id) val; -} - -int -hprofDumpStackFrames(hprof_context_t *ctx) -{ - HashIter iter; - hprof_record_t *rec = &ctx->curRec; - - dvmHashTableLock(gStackFrameHashTable); - - for (dvmHashIterBegin(gStackFrameHashTable, &iter); - !dvmHashIterDone(&iter); - dvmHashIterNext(&iter)) - { - const StackFrameEntry *stackFrameEntry; - const Method *method; - int pc; - const char *sourceFile; - ClassObject *clazz; - int lineNum; - - hprofStartNewRecord(ctx, HPROF_TAG_STACK_FRAME, HPROF_TIME); - - stackFrameEntry = (const StackFrameEntry *) dvmHashIterData(&iter); - assert(stackFrameEntry != NULL); - - method = stackFrameEntry->frame.method; - pc = stackFrameEntry->frame.pc; - sourceFile = dvmGetMethodSourceFile(method); - if (sourceFile == NULL) { - sourceFile = "<unknown>"; - lineNum = 0; - } else { - lineNum = dvmLineNumFromPC(method, pc); - } - clazz = (ClassObject *) hprofLookupClassId(method->clazz); - - /* STACK FRAME format: - * - * ID: ID for this stack frame - * ID: ID for the method name - * ID: ID for the method descriptor - * ID: ID for the source file name - * u4: class serial number - * u4: line number, 0 = no line information - * - * We use the address of the stack frame as its ID. - */ - - DexStringCache cache; - const char* descriptor; - - dexStringCacheInit(&cache); - descriptor = dexProtoGetMethodDescriptor(&method->prototype, &cache); - - hprofAddIdToRecord(rec, (u4) stackFrameEntry); - hprofAddIdToRecord(rec, hprofLookupStringId(method->name)); - hprofAddIdToRecord(rec, hprofLookupStringId(descriptor)); - hprofAddIdToRecord(rec, hprofLookupStringId(sourceFile)); - hprofAddU4ToRecord(rec, (u4) clazz->serialNumber); - hprofAddU4ToRecord(rec, (u4) lineNum); - - dexStringCacheRelease(&cache); - } - - dvmHashTableUnlock(gStackFrameHashTable); - return 0; -} diff --git a/vm/oo/Array.c b/vm/oo/Array.c index ca95488d1..314231c53 100644 --- a/vm/oo/Array.c +++ b/vm/oo/Array.c @@ -21,10 +21,6 @@ #include <stdlib.h> #include <stddef.h> -#if WITH_HPROF_STACK -#include "hprof/Hprof.h" -#endif - static ClassObject* createArrayClass(const char* descriptor, Object* loader); static ClassObject* createPrimitiveClass(int idx); @@ -65,9 +61,6 @@ ArrayObject* dvmAllocArray(ClassObject* arrayClass, size_t length, newArray->length = length; LOGVV("AllocArray: %s [%d] (%d)\n", arrayClass->descriptor, (int) length, (int) size); -#if WITH_HPROF_STACK - hprofFillInStackTrace(&newArray->obj); -#endif dvmTrackAllocation(arrayClass, size); } /* the caller must call dvmReleaseTrackedAlloc */ @@ -437,9 +430,6 @@ static ClassObject* createArrayClass(const char* descriptor, Object* loader) (Object *)elementClass->classLoader); newClass->arrayDim = arrayDim; newClass->status = CLASS_INITIALIZED; -#if WITH_HPROF_STACK - hprofFillInStackTrace(newClass); -#endif /* don't need to set newClass->objectSize */ @@ -644,9 +634,6 @@ static ClassObject* createPrimitiveClass(int idx) newClass->descriptor = kClassDescriptors[idx]; //newClass->super = gDvm.classJavaLangObject; newClass->status = CLASS_INITIALIZED; -#if WITH_HPROF_STACK - hprofFillInStackTrace(newClass); -#endif /* don't need to set newClass->objectSize */ diff --git a/vm/reflect/Proxy.c b/vm/reflect/Proxy.c index 33e5ad697..03c998206 100644 --- a/vm/reflect/Proxy.c +++ b/vm/reflect/Proxy.c @@ -195,9 +195,6 @@ ClassObject* dvmGenerateProxyClass(StringObject* str, ArrayObject* interfaces, dvmSetFieldObject((Object *)newClass, offsetof(ClassObject, classLoader), (Object *)loader); -#if WITH_HPROF_STACK - hprofFillInStackTrace(newClass); -#endif /* * Add direct method definitions. We have one (the constructor). |
