OSDN Git Service

android-x86/dalvik.git
13 years agoam 81fc9917: am c44bca65: Improve the heap verifier\'s failure report.
Carl Shapiro [Thu, 2 Sep 2010 02:00:39 +0000 (19:00 -0700)]
am 81fc9917: am c44bca65: Improve the heap verifier\'s failure report.

Merge commit '81fc991785ff3dc160942a88bbd713b677e63450'

* commit '81fc991785ff3dc160942a88bbd713b677e63450':
  Improve the heap verifier's failure report.

13 years agoam 8f96d635: am 57ee270b: Simplify the bitmap walker subroutines.
Carl Shapiro [Thu, 2 Sep 2010 02:00:36 +0000 (19:00 -0700)]
am 8f96d635: am 57ee270b: Simplify the bitmap walker subroutines.

Merge commit '8f96d635aace5ec6cb30fd84e95fab4091ed6479'

* commit '8f96d635aace5ec6cb30fd84e95fab4091ed6479':
  Simplify the bitmap walker subroutines.

13 years agoam 16b6646f: am b2e78d39: Consistently refer to the mark context as ctx.
Carl Shapiro [Thu, 2 Sep 2010 02:00:29 +0000 (19:00 -0700)]
am 16b6646f: am b2e78d39: Consistently refer to the mark context as ctx.

Merge commit '16b6646fcbc187b280dcc64f7bd1c1dabe8b37f0'

* commit '16b6646fcbc187b280dcc64f7bd1c1dabe8b37f0':
  Consistently refer to the mark context as ctx.

13 years agoam 73479900: am 5d81aa32: Collapse a variable declaration and initialization.
Carl Shapiro [Thu, 2 Sep 2010 02:00:26 +0000 (19:00 -0700)]
am 73479900: am 5d81aa32: Collapse a variable declaration and initialization.

Merge commit '73479900d36fdcb6a9cf3edae66335158860c043'

* commit '73479900d36fdcb6a9cf3edae66335158860c043':
  Collapse a variable declaration and initialization.

13 years agoam fa4ae67c: am 7511ae1e: Combine a typedef with a struct declaration.
Carl Shapiro [Thu, 2 Sep 2010 02:00:23 +0000 (19:00 -0700)]
am fa4ae67c: am 7511ae1e: Combine a typedef with a struct declaration.

Merge commit 'fa4ae67c6a5bca3c0fccbe7775292f61be2935d5'

* commit 'fa4ae67c6a5bca3c0fccbe7775292f61be2935d5':
  Combine a typedef with a struct declaration.

13 years agoam 03dce8ca: am eff16fb8: Use symbolic constants when computing bits-per-word.
Carl Shapiro [Thu, 2 Sep 2010 02:00:19 +0000 (19:00 -0700)]
am 03dce8ca: am eff16fb8: Use symbolic constants when computing bits-per-word.

Merge commit '03dce8ca75c05f0588ceb5db4b236746e8f445e7'

* commit '03dce8ca75c05f0588ceb5db4b236746e8f445e7':
  Use symbolic constants when computing bits-per-word.

13 years agoam 27fc78f6: am ca2d17e5: Merge "Bitmap naming clean-up." into gingerbread
Carl Shapiro [Thu, 2 Sep 2010 02:00:15 +0000 (19:00 -0700)]
am 27fc78f6: am ca2d17e5: Merge "Bitmap naming clean-up." into gingerbread

Merge commit '27fc78f6b8d5a641024c2bd393cddaf5a9f818aa'

* commit '27fc78f6b8d5a641024c2bd393cddaf5a9f818aa':
  Bitmap naming clean-up.

13 years agoam 7453145e: am a1227409: Intrinsics for float/int and double/long conversions.
Elliott Hughes [Thu, 2 Sep 2010 02:00:10 +0000 (19:00 -0700)]
am 7453145e: am a1227409: Intrinsics for float/int and double/long conversions.

Merge commit '7453145e658dfe5b93bf19a997df617b0f66b136'

* commit '7453145e658dfe5b93bf19a997df617b0f66b136':
  Intrinsics for float/int and double/long conversions.

13 years agoam c44bca65: Improve the heap verifier\'s failure report.
Carl Shapiro [Thu, 2 Sep 2010 01:45:12 +0000 (18:45 -0700)]
am c44bca65: Improve the heap verifier\'s failure report.

Merge commit 'c44bca6530787454ee794cf2f83c1c6671a93aa8' into gingerbread-plus-aosp

* commit 'c44bca6530787454ee794cf2f83c1c6671a93aa8':
  Improve the heap verifier's failure report.

13 years agoam 57ee270b: Simplify the bitmap walker subroutines.
Carl Shapiro [Thu, 2 Sep 2010 01:41:16 +0000 (18:41 -0700)]
am 57ee270b: Simplify the bitmap walker subroutines.

Merge commit '57ee270b755271166b2349321e5b8b5457731dd7' into gingerbread-plus-aosp

* commit '57ee270b755271166b2349321e5b8b5457731dd7':
  Simplify the bitmap walker subroutines.

13 years agoam b2e78d39: Consistently refer to the mark context as ctx.
Carl Shapiro [Thu, 2 Sep 2010 01:39:20 +0000 (18:39 -0700)]
am b2e78d39: Consistently refer to the mark context as ctx.

Merge commit 'b2e78d39f6df19a6222b3cd4c7010864fb8cb55f' into gingerbread-plus-aosp

* commit 'b2e78d39f6df19a6222b3cd4c7010864fb8cb55f':
  Consistently refer to the mark context as ctx.

13 years agoam 5d81aa32: Collapse a variable declaration and initialization.
Carl Shapiro [Thu, 2 Sep 2010 01:39:17 +0000 (18:39 -0700)]
am 5d81aa32: Collapse a variable declaration and initialization.

Merge commit '5d81aa327a11f6e929c2396d34c343923268bdc3' into gingerbread-plus-aosp

* commit '5d81aa327a11f6e929c2396d34c343923268bdc3':
  Collapse a variable declaration and initialization.

13 years agoam 7511ae1e: Combine a typedef with a struct declaration.
Carl Shapiro [Thu, 2 Sep 2010 01:39:14 +0000 (18:39 -0700)]
am 7511ae1e: Combine a typedef with a struct declaration.

Merge commit '7511ae1ed686ccdf6cfefeabeede0cedb0c36b77' into gingerbread-plus-aosp

* commit '7511ae1ed686ccdf6cfefeabeede0cedb0c36b77':
  Combine a typedef with a struct declaration.

13 years agoam eff16fb8: Use symbolic constants when computing bits-per-word.
Carl Shapiro [Thu, 2 Sep 2010 01:39:07 +0000 (18:39 -0700)]
am eff16fb8: Use symbolic constants when computing bits-per-word.

Merge commit 'eff16fb843ec191508d2e8306b6dfd8209ede501' into gingerbread-plus-aosp

* commit 'eff16fb843ec191508d2e8306b6dfd8209ede501':
  Use symbolic constants when computing bits-per-word.

13 years agoam ca2d17e5: Merge "Bitmap naming clean-up." into gingerbread
Carl Shapiro [Thu, 2 Sep 2010 01:38:47 +0000 (18:38 -0700)]
am ca2d17e5: Merge "Bitmap naming clean-up." into gingerbread

Merge commit 'ca2d17e55ae11434c83e395867d3258f9b9b8474' into gingerbread-plus-aosp

* commit 'ca2d17e55ae11434c83e395867d3258f9b9b8474':
  Bitmap naming clean-up.

13 years agoam a1227409: Intrinsics for float/int and double/long conversions.
Elliott Hughes [Thu, 2 Sep 2010 01:38:33 +0000 (18:38 -0700)]
am a1227409: Intrinsics for float/int and double/long conversions.

Merge commit 'a1227409084c4a675cc83ada128f364506528b9c' into gingerbread-plus-aosp

* commit 'a1227409084c4a675cc83ada128f364506528b9c':
  Intrinsics for float/int and double/long conversions.

13 years agoImprove the heap verifier's failure report.
Carl Shapiro [Fri, 27 Aug 2010 22:21:13 +0000 (15:21 -0700)]
Improve the heap verifier's failure report.

Previously, when a reference verify failed we would print the location
of the bad reference and abort.  With this change, when a reference
fails to verify we try to print out more context.  First, we dump the
object which contains the bad references and print each reference that
failed verification.  Following that, we scan the roots and the heap
and print all of the objects which reference the bad object.

13 years agoSimplify the bitmap walker subroutines.
Carl Shapiro [Fri, 27 Aug 2010 20:06:48 +0000 (13:06 -0700)]
Simplify the bitmap walker subroutines.

This change...

* Separates walking from sweeping.  Walking had been implemented by a
  sweeping with an empty mark bitmap argument.

* Localizes the finger machinations to scanBitmapCallback.  There is
  one use of the finger but all callbacks received the argument.

* Inlines a simplified bitmap walking routine operating a pointer at a
  time.  Only sweeping benefits from batching decoded addresses.

13 years agoConsistently refer to the mark context as ctx.
Carl Shapiro [Fri, 20 Aug 2010 18:34:18 +0000 (11:34 -0700)]
Consistently refer to the mark context as ctx.

13 years agoCollapse a variable declaration and initialization.
Carl Shapiro [Fri, 20 Aug 2010 18:04:25 +0000 (11:04 -0700)]
Collapse a variable declaration and initialization.

13 years agoCombine a typedef with a struct declaration.
Carl Shapiro [Thu, 19 Aug 2010 23:54:01 +0000 (16:54 -0700)]
Combine a typedef with a struct declaration.

13 years agoUse symbolic constants when computing bits-per-word.
Carl Shapiro [Thu, 19 Aug 2010 21:29:41 +0000 (14:29 -0700)]
Use symbolic constants when computing bits-per-word.

13 years agoMerge "Bitmap naming clean-up." into gingerbread
Carl Shapiro [Thu, 2 Sep 2010 01:22:58 +0000 (18:22 -0700)]
Merge "Bitmap naming clean-up." into gingerbread

13 years agoBitmap naming clean-up.
Carl Shapiro [Thu, 19 Aug 2010 04:04:31 +0000 (21:04 -0700)]
Bitmap naming clean-up.

Disambiguate bitmaps based on their use by adding a "curr" or "prev"
prefix.  Also, fix names in a prototype to match the definition.

13 years agoIntrinsics for float/int and double/long conversions.
Elliott Hughes [Sat, 21 Aug 2010 01:47:36 +0000 (18:47 -0700)]
Intrinsics for float/int and double/long conversions.

[cherry-picked e22bd84c8c8a57ddd86c21a1f65137d549b07935 from dalvik-dev to gingerbread]

Bug: 2935622
Change-Id: Ib4de19033dc4a08f41bf0eb0f7a21dcde216aae3

13 years agoam b685b591: am 4a2b20a1: Let <stdbool.h> (or its substitute) get picked up via the...
Dan Bornstein [Thu, 2 Sep 2010 00:19:29 +0000 (17:19 -0700)]
am b685b591: am 4a2b20a1: Let <stdbool.h> (or its substitute) get picked up via the preexisting mechanism in vm/Common.h.

Merge commit 'b685b5911262329759e6f2c8ec8a4465a18b324d'

* commit 'b685b5911262329759e6f2c8ec8a4465a18b324d':
  Let <stdbool.h> (or its substitute) get picked up via the preexisting

13 years agoam b204391f: am ba2f27fb: Merge "Removal of more sampling profiler bits" into gingerbread
Brian Carlstrom [Thu, 2 Sep 2010 00:01:14 +0000 (17:01 -0700)]
am b204391f: am ba2f27fb: Merge "Removal of more sampling profiler bits" into gingerbread

Merge commit 'b204391f6846801c3df9cd5265340e256fb86ee5'

* commit 'b204391f6846801c3df9cd5265340e256fb86ee5':
  Removal of more sampling profiler bits

13 years agoam 4a2b20a1: Let <stdbool.h> (or its substitute) get picked up via the preexisting...
Dan Bornstein [Wed, 1 Sep 2010 23:58:01 +0000 (16:58 -0700)]
am 4a2b20a1: Let <stdbool.h> (or its substitute) get picked up via the preexisting mechanism in vm/Common.h.

Merge commit '4a2b20a1128b13dbcda9e7d1114f4d60a02431ed' into gingerbread-plus-aosp

* commit '4a2b20a1128b13dbcda9e7d1114f4d60a02431ed':
  Let <stdbool.h> (or its substitute) get picked up via the preexisting

13 years agoLet <stdbool.h> (or its substitute) get picked up via the preexisting
Dan Bornstein [Wed, 1 Sep 2010 23:44:23 +0000 (16:44 -0700)]
Let <stdbool.h> (or its substitute) get picked up via the preexisting
mechanism in vm/Common.h.

Change-Id: I6b79ee3d67b23d8077567a1bce0a58ae46ceb7f3

13 years agoam ba2f27fb: Merge "Removal of more sampling profiler bits" into gingerbread
Brian Carlstrom [Wed, 1 Sep 2010 21:53:24 +0000 (14:53 -0700)]
am ba2f27fb: Merge "Removal of more sampling profiler bits" into gingerbread

Merge commit 'ba2f27fb008942b17e603accc08ba07b1e3f1ddc' into gingerbread-plus-aosp

* commit 'ba2f27fb008942b17e603accc08ba07b1e3f1ddc':
  Removal of more sampling profiler bits

13 years agoMerge "Removal of more sampling profiler bits" into gingerbread
Brian Carlstrom [Wed, 1 Sep 2010 21:24:13 +0000 (14:24 -0700)]
Merge "Removal of more sampling profiler bits" into gingerbread

13 years agoam cc7b941f: am f598f762: Merge "Split out the optimized dex file handling into its...
Dan Bornstein [Wed, 1 Sep 2010 20:21:10 +0000 (13:21 -0700)]
am cc7b941f: am f598f762: Merge "Split out the optimized dex file handling into its own file." into gingerbread

Merge commit 'cc7b941f9eaa92e2a4e7795a2c2c98d4bf15fc44'

* commit 'cc7b941f9eaa92e2a4e7795a2c2c98d4bf15fc44':
  Split out the optimized dex file handling into its own file.

13 years agoRemoval of more sampling profiler bits
Brian Carlstrom [Wed, 1 Sep 2010 17:49:48 +0000 (10:49 -0700)]
Removal of more sampling profiler bits

dalvik/vm/native/SystemThread.[ch] was added for the old sampling
profiler, and can be removed as it's not needed for the new one.

Bug: 2967741
Change-Id: Ibd306b4ba579f9796facbf7a69719b3cb6640762

13 years agoam f598f762: Merge "Split out the optimized dex file handling into its own file....
Dan Bornstein [Wed, 1 Sep 2010 18:55:49 +0000 (11:55 -0700)]
am f598f762: Merge "Split out the optimized dex file handling into its own file." into gingerbread

Merge commit 'f598f7627b02cacfcb1da56a712d6a1d48ec46ed' into gingerbread-plus-aosp

* commit 'f598f7627b02cacfcb1da56a712d6a1d48ec46ed':
  Split out the optimized dex file handling into its own file.

13 years agoMerge "Split out the optimized dex file handling into its own file." into gingerbread
Dan Bornstein [Wed, 1 Sep 2010 18:54:08 +0000 (11:54 -0700)]
Merge "Split out the optimized dex file handling into its own file." into gingerbread

13 years agoam 7936472e: am 0f680873: New Java-based SamplingProfiler
Brian Carlstrom [Wed, 1 Sep 2010 17:47:20 +0000 (10:47 -0700)]
am 7936472e: am 0f680873: New Java-based SamplingProfiler

Merge commit '7936472e2af62ec5e50c1463660a028e9ae21418'

* commit '7936472e2af62ec5e50c1463660a028e9ae21418':
  New Java-based SamplingProfiler

13 years agoam 0f680873: New Java-based SamplingProfiler
Brian Carlstrom [Wed, 1 Sep 2010 17:44:45 +0000 (10:44 -0700)]
am 0f680873: New Java-based SamplingProfiler

Merge commit '0f68087322e3a43df3763d3500fc564d147793e7' into gingerbread-plus-aosp

* commit '0f68087322e3a43df3763d3500fc564d147793e7':
  New Java-based SamplingProfiler

13 years agoNew Java-based SamplingProfiler
Brian Carlstrom [Wed, 18 Aug 2010 21:27:25 +0000 (14:27 -0700)]
New Java-based SamplingProfiler

Summary:
- libcore: new Java based SamplingProfiler
- dalvik: remove old SamplingProfiler native bits
- frameworks/base: New placeholder SamplingProfilerIntegration
- vendor/google: remove old profiler snapshot parsing code

Details:

libcore

   A new 100% Java SamplingProfiler. While it has more overhead that
   the old native one, the new one can actually collect more than the
   current PC and frame pointer, so you can get useful context of
   where your app is spending time. It currently provides ASCII hprof
   format output for use with tools like PerfAnal
dalvik/src/main/java/dalvik/system/SamplingProfiler.java

    Unit test for the new SamplingProfiler
dalvik/src/test/java/dalvik/system/SamplingProfilerTest.java

    Add core-tests-dalvik
JavaLibrary.mk

dalvik

    Removing native code that supported the old SamplingProfiler
vm/Dvm.mk
vm/native/InternalNative.c
vm/native/dalvik_system_SamplingProfiler.c

frameworks/base

  Placeholder SamplingProfilerIntegration. Later plans include
  generating EventStackTrace protobufs.

    New SamplingProfiler does not have a global instance, so
    SamplingProfilerIntegration provides one in INSTANCE. Old binary
    snapshot format is temporily replaced with ASCII hprof data.
core/java/com/android/internal/os/SamplingProfilerIntegration.java

    Simplified interface for zygote profile snapshotting
core/java/com/android/internal/os/ZygoteInit.java

    Current SamplingProfilerIntegration does not track event loop
    explicitly, but hprof information does include thread information.
core/java/android/app/ActivityThread.java

vendor/google

    Removing code for parsing old SamplingProfiler snapshot format
tools/samplingprofiler/Android.mk
tools/samplingprofiler/NOTICE
tools/samplingprofiler/profiler.iml
tools/samplingprofiler/profiler.ipr
tools/samplingprofiler/pull-snapshots.sh
tools/samplingprofiler/sorttable.js
tools/samplingprofiler/src/com/android/profiler/PrintHtml.java

13 years agoSplit out the optimized dex file handling into its own file.
Dan Bornstein [Tue, 31 Aug 2010 23:50:00 +0000 (16:50 -0700)]
Split out the optimized dex file handling into its own file.

Also, make the optimized dex data area be consistently referred to as
the "opt" section instead of sometimes the "aux" section.

Change-Id: Id5589c13ce4b53d713f8186314ea886cd884c865

13 years agoam 55ad1118: am f36b5723: If there\'s an error dropping privileges, abort.
Nick Kralevich [Mon, 30 Aug 2010 21:27:57 +0000 (14:27 -0700)]
am 55ad1118: am f36b5723: If there\'s an error dropping privileges, abort.

Merge commit '55ad111870f178513d3280b7a380875695710f9d'

* commit '55ad111870f178513d3280b7a380875695710f9d':
  If there's an error dropping privileges, abort.

13 years agoam f36b5723: If there\'s an error dropping privileges, abort.
Nick Kralevich [Mon, 30 Aug 2010 21:19:06 +0000 (14:19 -0700)]
am f36b5723: If there\'s an error dropping privileges, abort.

Merge commit 'f36b57235b765c9eec3c001773b34c59cdefd87a' into gingerbread-plus-aosp

* commit 'f36b57235b765c9eec3c001773b34c59cdefd87a':
  If there's an error dropping privileges, abort.

13 years agoIf there's an error dropping privileges, abort.
Nick Kralevich [Mon, 30 Aug 2010 19:49:33 +0000 (12:49 -0700)]
If there's an error dropping privileges, abort.

Change-Id: I85ce12e93cb8c297add756dc3b872b8346eda00b

13 years agoam ae59bcd7: am 1a509a4e: JIT: Add memory barriers on monitor enter/exit [issue 2951403]
buzbee [Sat, 28 Aug 2010 01:10:44 +0000 (18:10 -0700)]
am ae59bcd7: am 1a509a4e: JIT: Add memory barriers on monitor enter/exit [issue 2951403]

Merge commit 'ae59bcd792bf3c268581450e6070fbb38fddfb2b'

* commit 'ae59bcd792bf3c268581450e6070fbb38fddfb2b':
  JIT: Add memory barriers on monitor enter/exit [issue 2951403]

13 years agoam 1a509a4e: JIT: Add memory barriers on monitor enter/exit [issue 2951403]
buzbee [Fri, 27 Aug 2010 23:18:02 +0000 (16:18 -0700)]
am 1a509a4e: JIT: Add memory barriers on monitor enter/exit [issue 2951403]

Merge commit '1a509a4eb0fa468c5713553a7dec488a4e9d9a13' into gingerbread-plus-aosp

* commit '1a509a4eb0fa468c5713553a7dec488a4e9d9a13':
  JIT: Add memory barriers on monitor enter/exit [issue 2951403]

13 years agoJIT: Add memory barriers on monitor enter/exit [issue 2951403]
buzbee [Thu, 26 Aug 2010 17:46:51 +0000 (10:46 -0700)]
JIT: Add memory barriers on monitor enter/exit [issue 2951403]

Possibly the cause of [2950977 error in onDraw() method for stingray]

Change-Id: I3237c95a34daa75cd680b73d426dde11f3611a0e

13 years agoam d7f7cf4a: am 7eb3f7aa: Make JIT inliner work under single-stepping mode.
Ben Cheng [Fri, 27 Aug 2010 22:53:42 +0000 (15:53 -0700)]
am d7f7cf4a: am 7eb3f7aa: Make JIT inliner work under single-stepping mode.

Merge commit 'd7f7cf4ad493848b287b9d030bc7e9065e006b20'

* commit 'd7f7cf4ad493848b287b9d030bc7e9065e006b20':
  Make JIT inliner work under single-stepping mode.

13 years agoam d9b6dcdf: am fc132a5e: Fix self-verification to handle loop traces with single...
Ben Cheng [Fri, 27 Aug 2010 22:53:38 +0000 (15:53 -0700)]
am d9b6dcdf: am fc132a5e: Fix self-verification to handle loop traces with single-step instructions.

Merge commit 'd9b6dcdf3cf50c4f08c9851bbbef35f4dcc470a1'

* commit 'd9b6dcdf3cf50c4f08c9851bbbef35f4dcc470a1':
  Fix self-verification to handle loop traces with single-step instructions.

13 years agoam 7eb3f7aa: Make JIT inliner work under single-stepping mode.
Ben Cheng [Fri, 27 Aug 2010 06:16:36 +0000 (23:16 -0700)]
am 7eb3f7aa: Make JIT inliner work under single-stepping mode.

Merge commit '7eb3f7aaf43f07caf0de05ba4ae59e8ea6add796' into gingerbread-plus-aosp

* commit '7eb3f7aaf43f07caf0de05ba4ae59e8ea6add796':
  Make JIT inliner work under single-stepping mode.

13 years agoam fc132a5e: Fix self-verification to handle loop traces with single-step instructions.
Ben Cheng [Fri, 27 Aug 2010 06:13:13 +0000 (23:13 -0700)]
am fc132a5e: Fix self-verification to handle loop traces with single-step instructions.

Merge commit 'fc132a5e75842b516c4021b2bbfa02e134c46040' into gingerbread-plus-aosp

* commit 'fc132a5e75842b516c4021b2bbfa02e134c46040':
  Fix self-verification to handle loop traces with single-step instructions.

13 years agoMake JIT inliner work under single-stepping mode.
Ben Cheng [Thu, 26 Aug 2010 21:56:31 +0000 (14:56 -0700)]
Make JIT inliner work under single-stepping mode.

Bug: 2936661

(cherry-picked from dalvik-dev)

Change-Id: I35a012bd4dba2a2f9541b96a2e787687bbc7cd19

13 years agoFix self-verification to handle loop traces with single-step instructions.
Ben Cheng [Thu, 26 Aug 2010 19:28:56 +0000 (12:28 -0700)]
Fix self-verification to handle loop traces with single-step instructions.

(cherry-picked from dalvik-dev)

Change-Id: If1414d0e6767d36e33db8837e52dc91d11b4969b

13 years agoJIT: Add memory barriers on monitor enter/exit [issue 2951403]
buzbee [Thu, 26 Aug 2010 17:46:51 +0000 (10:46 -0700)]
JIT: Add memory barriers on monitor enter/exit [issue 2951403]

Possibly the cause of [2950977 error in onDraw() method for stingray]

Change-Id: I84da4dcb04735ccbedc21fa84c11c3ee8c4aa4e9

14 years agoam 19cbe64f: am fe1d6d58: Add option for specifying wall-clock in method profiling.
Andy McFadden [Wed, 25 Aug 2010 22:12:36 +0000 (15:12 -0700)]
am 19cbe64f: am fe1d6d58: Add option for specifying wall-clock in method profiling.

Merge commit '19cbe64f168aa783e6a9290c71c5715fc73e69fa'

* commit '19cbe64f168aa783e6a9290c71c5715fc73e69fa':
  Add option for specifying wall-clock in method profiling.

14 years agoam fe1d6d58: Add option for specifying wall-clock in method profiling.
Andy McFadden [Wed, 25 Aug 2010 22:02:05 +0000 (15:02 -0700)]
am fe1d6d58: Add option for specifying wall-clock in method profiling.

Merge commit 'fe1d6d586614fa51d82857e09128d6671be21d56' into gingerbread-plus-aosp

* commit 'fe1d6d586614fa51d82857e09128d6671be21d56':
  Add option for specifying wall-clock in method profiling.

14 years agoAdd option for specifying wall-clock in method profiling.
Andy McFadden [Wed, 25 Aug 2010 19:05:44 +0000 (12:05 -0700)]
Add option for specifying wall-clock in method profiling.

Normally you want to use the per-thread CPU clock rather than the wall
clock, because (a) it's more useful and (b) traceview goes a little nuts
if you don't.  However, it's useful for some performance testing.

The command-line option allows you to switch modes like this:

  % adb shell stop
  % adb shell setprop dalvik.vm.extra-opts -Xprofile:wallclock
  % adb shell start

This also changes the somewhat nebulous "clock=global" trace header line
to "clock=wall".  Nothing looks at this anyway so I'm not worried
about breaking compatibility.

While I was in here, I fixed a couple of problems caused by failure to
initialize data structures that made dmtracedump crash (yay valgrind).

Bug 2943229.

(cherry-pick from dalvik-dev)

Change-Id: I2f6657f7abe02f2a17784588d922b88397639a47

14 years agoam aef5e78d: am 9e02e4b1: Revert "JIT: Disable inlining to work around sholes boot...
Ben Cheng [Wed, 25 Aug 2010 21:17:39 +0000 (14:17 -0700)]
am aef5e78d: am 9e02e4b1: Revert "JIT: Disable inlining to work around sholes boot crash"

Merge commit 'aef5e78d045f12726a464fa3603ad70d15879b22'

* commit 'aef5e78d045f12726a464fa3603ad70d15879b22':
  Revert "JIT: Disable inlining to work around sholes boot crash"

14 years agoam 9e02e4b1: Revert "JIT: Disable inlining to work around sholes boot crash"
Ben Cheng [Wed, 25 Aug 2010 21:14:31 +0000 (14:14 -0700)]
am 9e02e4b1: Revert "JIT: Disable inlining to work around sholes boot crash"

Merge commit '9e02e4b1fa08cebefa0f79cd407f4a88611cf473' into gingerbread-plus-aosp

* commit '9e02e4b1fa08cebefa0f79cd407f4a88611cf473':
  Revert "JIT: Disable inlining to work around sholes boot crash"

14 years agoRevert "JIT: Disable inlining to work around sholes boot crash"
Ben Cheng [Wed, 25 Aug 2010 20:01:54 +0000 (13:01 -0700)]
Revert "JIT: Disable inlining to work around sholes boot crash"

This reverts commit 07ecdc0b5d92099364eebdaee9aec297c4bbad72.

Random crash is confirmed to be caused by a Cortex-A8 bug. Toolchain fix is
pending and the current ToT is not triggering the crash.

(cherry-picked from dalvik-dev)

Change-Id: I12732a1fc2aa894a678bbb71e871e97f655c6814

14 years agoam 557763e8: am 3ef3f182: Merge "Change the way thread suspension works." into ginger...
Andy McFadden [Wed, 25 Aug 2010 19:24:15 +0000 (12:24 -0700)]
am 557763e8: am 3ef3f182: Merge "Change the way thread suspension works." into gingerbread

Merge commit '557763e8845b9a81105c8b7380ac24f4869ec5bc'

* commit '557763e8845b9a81105c8b7380ac24f4869ec5bc':
  Change the way thread suspension works.

14 years agoam 61e646fa: am 3b6ee1a4: Fix a DDMS thread monitoring crash.
Andy McFadden [Wed, 25 Aug 2010 19:24:12 +0000 (12:24 -0700)]
am 61e646fa: am 3b6ee1a4: Fix a DDMS thread monitoring crash.

Merge commit '61e646fae271c8cff7c36dfa897a78430956ba53'

* commit '61e646fae271c8cff7c36dfa897a78430956ba53':
  Fix a DDMS thread monitoring crash.

14 years agoam 3ef3f182: Merge "Change the way thread suspension works." into gingerbread
Andy McFadden [Wed, 25 Aug 2010 19:21:49 +0000 (12:21 -0700)]
am 3ef3f182: Merge "Change the way thread suspension works." into gingerbread

Merge commit '3ef3f182b126be36acc5e1132bfff4857b442213' into gingerbread-plus-aosp

* commit '3ef3f182b126be36acc5e1132bfff4857b442213':
  Change the way thread suspension works.

14 years agoam 3b6ee1a4: Fix a DDMS thread monitoring crash.
Andy McFadden [Wed, 25 Aug 2010 19:21:45 +0000 (12:21 -0700)]
am 3b6ee1a4: Fix a DDMS thread monitoring crash.

Merge commit '3b6ee1a417a717c44e2a59ed73c930f4be8ea54b' into gingerbread-plus-aosp

* commit '3b6ee1a417a717c44e2a59ed73c930f4be8ea54b':
  Fix a DDMS thread monitoring crash.

14 years agoMerge "Change the way thread suspension works." into gingerbread
Andy McFadden [Wed, 25 Aug 2010 19:20:21 +0000 (12:20 -0700)]
Merge "Change the way thread suspension works." into gingerbread

14 years agoChange the way thread suspension works.
Andy McFadden [Mon, 23 Aug 2010 23:45:24 +0000 (16:45 -0700)]
Change the way thread suspension works.

There are at least three ways to handle detection of thread suspension
correctly: (1) hold a mutex, (2) pile all state into a single 32-bit
location and use atomic ops, and (3) order the operations carefully.
Of these, #3 has the least overhead on uniprocessors, so we're going
with that.

It does introduce one quirk, because we're now changing to "running"
mode before checking to see if we're allowed to run.  This creates
a tiny window of opportunity for assertions and thread dumps to see
what appears to be a thread that's running when it shouldn't be.
This is correctable with additional work (e.g. transitioning through
a pre-running state) but probably not worth worrying about.

This eliminates the separate self->isSuspended flag in favor of the
new THREAD_SUSPENDED thread state.

Bug 2667016.

(cherry-pick from dalvik-dev)

Change-Id: Ibc77ebbb03a7993bc4057c1c375498172ca8ff1c

14 years agoFix a DDMS thread monitoring crash.
Andy McFadden [Tue, 24 Aug 2010 21:23:11 +0000 (14:23 -0700)]
Fix a DDMS thread monitoring crash.

We changed the order of events during thread attaches, which means
it's now possible to have Thread structs with null threadObj fields.
This bit of code didn't change with the times, which made it possible
for a process being watched by DDMS to crash if we grabbed the thread
state at just the wrong time.

(cherry-pick from dalvik-dev)

Change-Id: Icd7f523ee8327f00693e601c1c82d3a8defb247f

14 years agoam ded830f7: resolved conflicts for merge of aa63a6a6 to gingerbread-plus-aosp
Andy McFadden [Tue, 24 Aug 2010 18:21:47 +0000 (11:21 -0700)]
am ded830f7: resolved conflicts for merge of aa63a6a6 to gingerbread-plus-aosp

Merge commit 'ded830f7d936821a4136fc8c08064b43beff9341'

* commit 'ded830f7d936821a4136fc8c08064b43beff9341':
  Added new bytecodes for the x86-atom fast interpreter build.

14 years agoam 0fb72477: am f16cfefc: Properly handle volatile field accesses from JNI.
Andy McFadden [Tue, 24 Aug 2010 18:19:58 +0000 (11:19 -0700)]
am 0fb72477: am f16cfefc: Properly handle volatile field accesses from JNI.

Merge commit '0fb72477bb2454a2ae5416f35376d3714abefc1f'

* commit '0fb72477bb2454a2ae5416f35376d3714abefc1f':
  Properly handle volatile field accesses from JNI.

14 years agoam 39796a6a: am 30febfdf: Merge remote branch \'goog/dalvik-dev\' into dalvik-dev...
Brian Carlstrom [Tue, 24 Aug 2010 16:03:08 +0000 (09:03 -0700)]
am 39796a6a: am 30febfdf: Merge remote branch \'goog/dalvik-dev\' into dalvik-dev-to-gingerbread

Merge commit '39796a6aa79f687ac0b1254f6a8be048ad1243d8'

* commit '39796a6aa79f687ac0b1254f6a8be048ad1243d8': (26 commits)
  Remove an assertion that cannot be guaranteed.
  Always support debugging and profiling.
  Fix a critical space leak introduced by concurrent sweeping.
  Add a little bit of paranoia to the odex data reader.
  Nudge a couple of log messages.
  Fix build breakage caused by the countInstancesOfClass change.
  Add a method for counting the extant instances of a class.
  Added fsync call to dexopt.
  JIT: Fix for armv5te-VFP bug [Issue 2916682]
  Cast to a byte pointer before performing arithmetic.
  Limit scanning to cards within the committed region of the heap.
  Remove a malfunctioning predicate used only in assertions.
  Remove debugging code and stale comments from the sweep callback.
  Fix build breakage caused by a bad merge from master.
  JIT: Correct conversion of cb[n]z to cmp/cond_br pair
  Print callee information in the JIT profile outout
  JIT: Fix for lightweight assembler retry mechanism.
  JIT: Fix for 2898397 assert in JIT (chain cell offset)
  More SMP fixes.
  Fix some potential SMP issues.
  ...

14 years agoresolved conflicts for merge of aa63a6a6 to gingerbread-plus-aosp
Andy McFadden [Mon, 23 Aug 2010 21:06:47 +0000 (14:06 -0700)]
resolved conflicts for merge of aa63a6a6 to gingerbread-plus-aosp

Change-Id: Ib2f8c4c71a74987d284eba4be96ff4d329c40a50

14 years agoMerge "Added new bytecodes for the x86-atom fast interpreter build."
Jean-Baptiste Queru [Mon, 23 Aug 2010 20:31:40 +0000 (13:31 -0700)]
Merge "Added new bytecodes for the x86-atom fast interpreter build."

14 years agoam f16cfefc: Properly handle volatile field accesses from JNI.
Andy McFadden [Mon, 23 Aug 2010 14:54:41 +0000 (07:54 -0700)]
am f16cfefc: Properly handle volatile field accesses from JNI.

Merge commit 'f16cfefc199d1416c5f83446c1d299786accc737' into gingerbread-plus-aosp

* commit 'f16cfefc199d1416c5f83446c1d299786accc737':
  Properly handle volatile field accesses from JNI.

14 years agolibdl should not be included in the simulator build
Brian Carlstrom [Sun, 22 Aug 2010 18:13:56 +0000 (11:13 -0700)]
libdl should not be included in the simulator build

Change-Id: Ib286e74d4baf035f6427bb00468171c8c86b6879

14 years agoam 1310319f: am 3e9bfe0b: Support dalvikvm on a Linux x86 host
Jesse Wilson [Sat, 21 Aug 2010 16:36:30 +0000 (09:36 -0700)]
am 1310319f: am 3e9bfe0b: Support dalvikvm on a Linux x86 host

Merge commit '1310319f0f89c1fc2890657aaa1f0b0ac30e099f'

* commit '1310319f0f89c1fc2890657aaa1f0b0ac30e099f':
  Support dalvikvm on a Linux x86 host

14 years agomanual merge
Jean-Baptiste Queru [Sat, 21 Aug 2010 01:53:43 +0000 (18:53 -0700)]
manual merge

Change-Id: I8f680ec1b2e29bd0acde675a2ab4ffd65c7ce84e

14 years agoProperly handle volatile field accesses from JNI.
Andy McFadden [Wed, 18 Aug 2010 22:51:37 +0000 (15:51 -0700)]
Properly handle volatile field accesses from JNI.

For uniprocessors, we need to use the 64-bit quasiatomic functions.  For
SMP, we need to do that and also issue barriers on all operations.

This was mostly a matter of adding a bunch of inline getter/setter
functions and then calling the right one based on whether or not the
field is declared volatile.

Also, corrected the output for a failing CHECK_CLASS test in CheckJNI.

Bug 2890631.

(cherry-pick from dalvik-dev)

Change-Id: I3da3b70c906eddd5934347caea83ab041d22cd68

14 years agoam 30febfdf: Merge remote branch \'goog/dalvik-dev\' into dalvik-dev-to-gingerbread
Brian Carlstrom [Fri, 20 Aug 2010 20:52:14 +0000 (13:52 -0700)]
am 30febfdf: Merge remote branch \'goog/dalvik-dev\' into dalvik-dev-to-gingerbread

Merge commit '30febfdf4abe39f99dec100de968cb831b555b27' into gingerbread-plus-aosp

* commit '30febfdf4abe39f99dec100de968cb831b555b27': (34 commits)
  Remove an assertion that cannot be guaranteed.
  Always support debugging and profiling.
  Fix a critical space leak introduced by concurrent sweeping.
  Add a little bit of paranoia to the odex data reader.
  Nudge a couple of log messages.
  Fix build breakage caused by the countInstancesOfClass change.
  Add a method for counting the extant instances of a class.
  Added fsync call to dexopt.
  JIT: Fix for armv5te-VFP bug [Issue 2916682]
  Cast to a byte pointer before performing arithmetic.
  Limit scanning to cards within the committed region of the heap.
  Remove a malfunctioning predicate used only in assertions.
  Remove debugging code and stale comments from the sweep callback.
  Fix build breakage caused by a bad merge from master.
  JIT: Correct conversion of cb[n]z to cmp/cond_br pair
  Sweep concurrently.
  Implement card table verification.
  Fix the ordering of lock acquisition in the heap worker.
  Print callee information in the JIT profile outout
  JIT: Fix for lightweight assembler retry mechanism.
  ...

14 years agoMerge remote branch 'goog/dalvik-dev' into dalvik-dev-to-gingerbread
Brian Carlstrom [Thu, 19 Aug 2010 18:21:12 +0000 (11:21 -0700)]
Merge remote branch 'goog/dalvik-dev' into dalvik-dev-to-gingerbread

Also includes cherry-pick of 07ecdc0b5d92099364eebdaee9aec297c4bbad72

Change-Id: Ie1744d78683f2f66dd1586f453f8bdd56ad2e9a5

14 years agoAdded new bytecodes for the x86-atom fast interpreter build.
Johnnie Birch [Mon, 2 Aug 2010 18:03:14 +0000 (11:03 -0700)]
Added new bytecodes for the x86-atom fast interpreter build.

Change-Id: Ided25c83d874eb02c78e01a0ea97dbb15ed30497

14 years agoRemove an assertion that cannot be guaranteed.
Carl Shapiro [Thu, 19 Aug 2010 01:10:05 +0000 (18:10 -0700)]
Remove an assertion that cannot be guaranteed.

The intention of this assert was to check that the address range
spanned by the mark bitmap was a proper superset of the live bitmap.
Because allocations can occur before these bitmaps are prepared, the
live bitmap may legitimately expand beyond the range of the mark
bitmap.  As such, this check is not reliable.

Change-Id: I2f23e9e7f3716a61ecf155ba81fd8baa5a82100d

14 years agoam 3e9bfe0b: Support dalvikvm on a Linux x86 host
Jesse Wilson [Thu, 19 Aug 2010 06:00:52 +0000 (23:00 -0700)]
am 3e9bfe0b: Support dalvikvm on a Linux x86 host

Merge commit '3e9bfe0bed2f27d01efdb03a71025c421d321956' into gingerbread-plus-aosp

* commit '3e9bfe0bed2f27d01efdb03a71025c421d321956':
  Support dalvikvm on a Linux x86 host

14 years agoSupport dalvikvm on a Linux x86 host
Jesse Wilson [Wed, 18 Aug 2010 18:35:23 +0000 (11:35 -0700)]
Support dalvikvm on a Linux x86 host

Change-Id: Id166ab03a01833e06ec1a9aa0059e4eb28ec04ce

14 years agoam ac830fea: Fix dx launching script to use the new platform-tools location.
Xavier Ducrohet [Thu, 19 Aug 2010 00:31:34 +0000 (17:31 -0700)]
am ac830fea: Fix dx launching script to use the new platform-tools location.

Merge commit 'ac830feace28957c9e84ce2cb0ed2a565bc24c99' into gingerbread-plus-aosp

* commit 'ac830feace28957c9e84ce2cb0ed2a565bc24c99':
  Fix dx launching script to use the new platform-tools location.

14 years agoFix dx launching script to use the new platform-tools location.
Xavier Ducrohet [Wed, 18 Aug 2010 22:42:19 +0000 (15:42 -0700)]
Fix dx launching script to use the new platform-tools location.

Change-Id: Ia4d316b0fb5193dc412aa5374fc270c5b10f70e5

14 years agoAlways support debugging and profiling.
Andy McFadden [Wed, 18 Aug 2010 19:19:51 +0000 (12:19 -0700)]
Always support debugging and profiling.

This eliminates the use of the WITH_DEBUGGER and WITH_PROFILER
conditional compilation flags.  We've never shipped a device without
these features, and it's unlikely we ever will.  They're not worth
the code clutter they cause.

As usual, since I can't test the x86-atom code I left that alone and
added an item to the TODO list.

Bug 2923442.

Change-Id: I335ebd5193bc86f7641513b1b41c0378839be1fe

14 years agoMerge "Nudge a couple of log messages." into dalvik-dev
Andy McFadden [Wed, 18 Aug 2010 14:45:17 +0000 (07:45 -0700)]
Merge "Nudge a couple of log messages." into dalvik-dev

14 years agoMerge "Fix a critical space leak introduced by concurrent sweeping." into dalvik-dev
Carl Shapiro [Wed, 18 Aug 2010 05:47:23 +0000 (22:47 -0700)]
Merge "Fix a critical space leak introduced by concurrent sweeping." into dalvik-dev

14 years agoFix a critical space leak introduced by concurrent sweeping.
Carl Shapiro [Wed, 18 Aug 2010 01:33:56 +0000 (18:33 -0700)]
Fix a critical space leak introduced by concurrent sweeping.

When computing the bitmaps for each heap, the live bitmap was assumed
to have greater extent than the mark bitmap.  With the concurrent
sweep the mark and live bitmaps are swapped before the sweep bitmaps
are computed.  As such, the live bitmap extent is always less than or
equal to the mark bitmap.  A benchmark which loops creating objects
just to drop them on the floor will exclude most objects in the heap
as candidates for sweeping and will exhaust the heap.

The change fixes the extent computation and reintroduces an assert to
check that the bitmap we assume to be the largest is the largest.

Change-Id: I78694d2a0550de70c85e2087d482050a147a207a

14 years agoMerge "Add a little bit of paranoia to the odex data reader." into dalvik-dev
Dan Bornstein [Tue, 17 Aug 2010 22:06:15 +0000 (15:06 -0700)]
Merge "Add a little bit of paranoia to the odex data reader." into dalvik-dev

14 years agoAdd a little bit of paranoia to the odex data reader.
Dan Bornstein [Tue, 17 Aug 2010 00:11:06 +0000 (17:11 -0700)]
Add a little bit of paranoia to the odex data reader.

This prevents some potential segfaults when working with (e.g., trying
to run) corrupted dex files, turning them into more informative error
messages.

Change-Id: Ie6845087bb17a5f65fafbd6f9ff335b6af489996

14 years agoNudge a couple of log messages.
Andy McFadden [Tue, 17 Aug 2010 00:04:01 +0000 (17:04 -0700)]
Nudge a couple of log messages.

Also, don't show errno on a short read.

Related to bug 2916809.

Change-Id: I163906d47b698ac5e77202c323db5823196169bb

14 years agoFix build breakage caused by the countInstancesOfClass change.
Carl Shapiro [Tue, 17 Aug 2010 20:30:48 +0000 (13:30 -0700)]
Fix build breakage caused by the countInstancesOfClass change.

There is an apparent visibility skew between passion-eng and sim-eng
builds.  On sim-eng, the contents of Heap.h are globally visible but
on passion-eng this is not the case.  To resolve this issue, I have
moved the offending declarations to alloc/Alloc.h which is directly
exported from Dalvik.h.

Change-Id: Iaf6f167964f81f24fa0817aa4a84b9fb4ff9a9a0

14 years agoMerge "Add a method for counting the extant instances of a class." into dalvik-dev
Carl Shapiro [Tue, 17 Aug 2010 19:24:44 +0000 (12:24 -0700)]
Merge "Add a method for counting the extant instances of a class." into dalvik-dev

14 years agoAdd a method for counting the extant instances of a class.
Carl Shapiro [Tue, 17 Aug 2010 19:22:49 +0000 (12:22 -0700)]
Add a method for counting the extant instances of a class.

This facility should supersede the use of finalizers in computing
instance counts for the "adb shell dumpsys meminfo" reports.

Change-Id: I026e7083e39aa296bbbcf665231ec20d6b37cdf6

14 years agoMerge "Added fsync call to dexopt." into dalvik-dev
Andy McFadden [Tue, 17 Aug 2010 17:06:58 +0000 (10:06 -0700)]
Merge "Added fsync call to dexopt." into dalvik-dev

14 years agoAdded fsync call to dexopt.
Andy McFadden [Mon, 16 Aug 2010 23:14:06 +0000 (16:14 -0700)]
Added fsync call to dexopt.

If various system-level things go wrong you might end up with a
correctly-written .odex header but an incomplete file, which ideally
would never happen.  This adds an fsync() call before we write the
header to make this less likely.

Change-Id: Ie5ac67dc7185ca9a4995710688e1219e46477c12

14 years agoam bce36059: am 52d4cd28: Rename registers on inlined instructions that use wide...
Ben Cheng [Mon, 16 Aug 2010 22:31:48 +0000 (15:31 -0700)]
am bce36059: am 52d4cd28: Rename registers on inlined instructions that use wide operands.

Merge commit 'bce36059dd1021b0cd06c02c3a9849ae6da4741b' into dalvik-dev

* commit 'bce36059dd1021b0cd06c02c3a9849ae6da4741b':
  Rename registers on inlined instructions that use wide operands.

14 years agoam 52d4cd28: Rename registers on inlined instructions that use wide operands.
Ben Cheng [Mon, 16 Aug 2010 22:19:46 +0000 (15:19 -0700)]
am 52d4cd28: Rename registers on inlined instructions that use wide operands.

Merge commit '52d4cd28a5d6d946934704e11e1d41450c10aa05'

* commit '52d4cd28a5d6d946934704e11e1d41450c10aa05':
  Rename registers on inlined instructions that use wide operands.

14 years agoRename registers on inlined instructions that use wide operands.
Ben Cheng [Mon, 16 Aug 2010 21:08:49 +0000 (14:08 -0700)]
Rename registers on inlined instructions that use wide operands.

For example, v1 in the callee should be v7 in the caller.

Before:
div-double v7, v8, v10
iput-wide-quick (C) v1, v6, (#136) <- v1 should be renamed
invoke-virtual-quick (PI) v6, v7, v8

After:
div-double v7, v8, v10
iput-wide-quick (C) v7, v6, (#136)
invoke-virtual-quick (PI) v6, v7, v8

Bug: 2907602

Change-Id: I21b9a45f8e422148d45de98c1ec9acbfd9783cc6

14 years agoJIT: Fix for armv5te-VFP bug [Issue 2916682]
buzbee [Sat, 14 Aug 2010 00:52:46 +0000 (17:52 -0700)]
JIT: Fix for armv5te-VFP bug [Issue 2916682]

Temp register was clobbered after explicit use rather than before.
Affects only armv5te-vfp builds.

Change-Id: I0a1c3f69a299f31bd50f3ec95ae83681b89ae6f1

14 years agoCast to a byte pointer before performing arithmetic.
Carl Shapiro [Thu, 12 Aug 2010 20:55:06 +0000 (13:55 -0700)]
Cast to a byte pointer before performing arithmetic.

Change-Id: I1efd3b327b8c0a052c975ed07ee0db648ba84581