diff options
author | buzbee <buzbee@google.com> | 2011-02-18 11:13:56 -0800 |
---|---|---|
committer | buzbee <buzbee@google.com> | 2011-02-18 11:13:56 -0800 |
commit | 03af43a4851879e98de8ffc19c786c293f68f4e7 (patch) | |
tree | 21ba6572e9df123390af3234738ddeb9602552da | |
parent | d8dc6b738a5b531e4ed39e696754bfecb2533c62 (diff) | |
download | android_dalvik-03af43a4851879e98de8ffc19c786c293f68f4e7.tar.gz android_dalvik-03af43a4851879e98de8ffc19c786c293f68f4e7.tar.bz2 android_dalvik-03af43a4851879e98de8ffc19c786c293f68f4e7.zip |
[JIT] Fix profile trace dump
The debugging profile mode prints out a list of the top ten traces,
followed by recompilations. In some cases, it is possible that a trace
was requested, but did not finish compiling before the run ended. If
so, that could cause the dump to fail. This CL adds a check for null
codeAddress to detect those cases.
Change-Id: I415fd94d8fa9e270f75d5114fa5cc5d993bd6997
-rw-r--r-- | vm/compiler/codegen/arm/Assemble.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/vm/compiler/codegen/arm/Assemble.c b/vm/compiler/codegen/arm/Assemble.c index f5fecbc47..34793ee9f 100644 --- a/vm/compiler/codegen/arm/Assemble.c +++ b/vm/compiler/codegen/arm/Assemble.c @@ -1991,7 +1991,8 @@ JitTraceDescription *dvmCopyTraceDescriptor(const u2 *pc, { const JitEntry *jitEntry = knownEntry ? knownEntry : dvmJitFindEntry(pc, false); - if (jitEntry == NULL) return NULL; + if ((jitEntry == NULL) || (jitEntry->codeAddress == 0)) + return NULL; /* Find out the startint point */ char *traceBase = getTraceBase(jitEntry); @@ -2078,8 +2079,10 @@ void dvmCompilerSortAndPrintTraceProfiles() } JitTraceDescription* desc = dvmCopyTraceDescriptor(NULL, &sortedEntries[i]); - dvmCompilerWorkEnqueue(sortedEntries[i].dPC, - kWorkOrderTraceDebug, desc); + if (desc) { + dvmCompilerWorkEnqueue(sortedEntries[i].dPC, + kWorkOrderTraceDebug, desc); + } } free(sortedEntries); |