OSDN Git Service

android-x86/dalvik.git
14 years agoam 15ffd8eb: am 7936472e: am 0f680873: New Java-based SamplingProfiler
Brian Carlstrom [Wed, 1 Sep 2010 17:57:17 +0000 (10:57 -0700)]
am 15ffd8eb: am 7936472e: am 0f680873: New Java-based SamplingProfiler

Merge commit '15ffd8eb5d9659d5f855cc19d504383be4ec89d5' into dalvik-dev

* commit '15ffd8eb5d9659d5f855cc19d504383be4ec89d5':
  New Java-based SamplingProfiler

14 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

14 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

14 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

14 years agoMerge "New Java-based SamplingProfiler" into dalvik-dev
Brian Carlstrom [Wed, 1 Sep 2010 16:57:35 +0000 (09:57 -0700)]
Merge "New Java-based SamplingProfiler" into dalvik-dev

14 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

Change-Id: Idb4defff0005ef203e577b5b5956506e3cd8dbf1

14 years agoMerge "Move the finger computation out of the bitmap scanning callback." into dalvik-dev
Carl Shapiro [Tue, 31 Aug 2010 23:55:32 +0000 (16:55 -0700)]
Merge "Move the finger computation out of the bitmap scanning callback." into dalvik-dev

14 years agoMove the finger computation out of the bitmap scanning callback.
Carl Shapiro [Tue, 31 Aug 2010 23:48:31 +0000 (16:48 -0700)]
Move the finger computation out of the bitmap scanning callback.

The finger computation depends on bitmap internals.  This knowledge
should not be part of the bitmap interface, just its implementation.
This change adds a new walker that computes and passes a finger
argument to a callback.  As part of this change, code to recompute the
end address during a walk has been removed from the ordinary bitmap
walker code.  That check is needed by the scanning walk as its
callback may advance the max address when setting mark bits for
objects beyond the finger.

Change-Id: Id6aa2e4fb3af383f125965d4fe27c5ab6b36c5b5

14 years agoMerge "Show CPU# and utime/stime in the Dalvik thread dump." into dalvik-dev
Andy McFadden [Tue, 31 Aug 2010 21:32:27 +0000 (14:32 -0700)]
Merge "Show CPU# and utime/stime in the Dalvik thread dump." into dalvik-dev

14 years agoShow CPU# and utime/stime in the Dalvik thread dump.
Andy McFadden [Tue, 31 Aug 2010 20:50:08 +0000 (13:50 -0700)]
Show CPU# and utime/stime in the Dalvik thread dump.

This adds the "CPU number last executed on" from /proc/stat to
the Dalvik thread output.  This may come in handy when looking at
thread dumps.  While I was at it I added the utime/stime values,
which may not be all that useful since they represent lifetime usage
rather than recent usage.

Output appears on the schedstat line:
  | schedstat=( 2930542006 9197204583 1284 ) ut=287 st=6 core=0

The routine that parses /proc/stat, previously only used for DDMS, has
been generalized.  This also fixes a problem with parsing threads
whose name includes a space.

I also changed this and the /proc/schedstat code to use /proc/self
instead of /proc/%d + getpid().

Bug 2884342.

Change-Id: Iec85bc929005044427ebbb468bfa0c9693444bca

14 years agoJIT: Add new compare-immed-and-branch primative & drop useless clrex
buzbee [Tue, 31 Aug 2010 17:16:35 +0000 (10:16 -0700)]
JIT: Add new compare-immed-and-branch primative & drop useless clrex

This allows better use of cbz/cbnz on Thumb2 targets.  Also, removed
the clrex from the inline monitor enter code (not necessary).

Change-Id: I3bfa90bcdf34f6ef3e2447c9c6f1b49a98a89e58

14 years agoMerge "Revert "Remove an unnecessary finger check when re-marking roots."" into dalvi...
Carl Shapiro [Mon, 30 Aug 2010 23:33:51 +0000 (16:33 -0700)]
Merge "Revert "Remove an unnecessary finger check when re-marking roots."" into dalvik-dev

14 years agoRevert "Remove an unnecessary finger check when re-marking roots."
Carl Shapiro [Mon, 30 Aug 2010 23:26:40 +0000 (16:26 -0700)]
Revert "Remove an unnecessary finger check when re-marking roots."

This reverts commit 6e02fef780c8a122a2ecd3d7afffe962d50d3838.

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

Merge commit '849a90539cb419bee2e08858979f3d6a1d08391a' into dalvik-dev

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

14 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.

14 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.

14 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

14 years agoMerge "Reduce the frequency of bitmap walk loop-bound computations." into dalvik-dev
Carl Shapiro [Mon, 30 Aug 2010 18:23:18 +0000 (11:23 -0700)]
Merge "Reduce the frequency of bitmap walk loop-bound computations." into dalvik-dev

14 years agoReduce the frequency of bitmap walk loop-bound computations.
Carl Shapiro [Mon, 30 Aug 2010 18:10:45 +0000 (11:10 -0700)]
Reduce the frequency of bitmap walk loop-bound computations.

Change-Id: I899b5ffe06a71f5c0b5de671edd6e8386a2688da

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

Merge commit 'fd907bf54649d4334928a523656a638e6e9de32e' into dalvik-dev

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

14 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]

14 years agoMerge "Improve the heap verifier's failure report." into dalvik-dev
Carl Shapiro [Fri, 27 Aug 2010 23:25:16 +0000 (16:25 -0700)]
Merge "Improve the heap verifier's failure report." into dalvik-dev

14 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]

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

Merge commit 'dc972b51830ecee9cc5ad6f35cc72082710eeb6d' into dalvik-dev

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

14 years agoam 02721b99: am d9b6dcdf: am fc132a5e: Fix self-verification to handle loop traces...
Ben Cheng [Fri, 27 Aug 2010 23:09:19 +0000 (16:09 -0700)]
am 02721b99: am d9b6dcdf: am fc132a5e: Fix self-verification to handle loop traces with single-step instructions.

Merge commit '02721b99f2bd79d720b30a1087dc36ae9842bc6a' into dalvik-dev

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

14 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

14 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.

14 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.

14 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.

Change-Id: Iee50375d42c297a350a5256e0a8d983cf5d59229

14 years agoRemove an unnecessary finger check when re-marking roots.
Carl Shapiro [Fri, 27 Aug 2010 21:04:47 +0000 (14:04 -0700)]
Remove an unnecessary finger check when re-marking roots.

The finger check, a less than check, is meaningful only during the
initial root marking.  After root marking, the finger is set to the
end of the virtual address space and the check always succeeds.  As
such, this check is superfluous during all other phases of garbage
collection as it always suceeds.

Change-Id: Ie4e5bc1fb57b41e484cb6d1081c9a874fa6effbc

14 years agoMerge "Simplify the bitmap walker subroutines." into dalvik-dev
Carl Shapiro [Fri, 27 Aug 2010 20:55:30 +0000 (13:55 -0700)]
Merge "Simplify the bitmap walker subroutines." into dalvik-dev

14 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.

Change-Id: I87485ac58d3ecf07916f142534fe96f77e7ff227

14 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.

14 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.

14 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

14 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

14 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
Change-Id: Id85530db5281e0ea28ffb31e8769f3bfec8be54a

14 years agoMerge "Fix self-verification to handle loop traces with single-step instructions...
Ben Cheng [Thu, 26 Aug 2010 20:24:00 +0000 (13:24 -0700)]
Merge "Fix self-verification to handle loop traces with single-step instructions." into dalvik-dev

14 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.

Change-Id: I8b7acef5693db923e4c30fc523ca1a312f8cca9a

14 years agoam 6ba7529b: JIT: Add memory barriers on monitor enter/exit [issue 2951403]
buzbee [Thu, 26 Aug 2010 18:28:49 +0000 (11:28 -0700)]
am 6ba7529b: JIT: Add memory barriers on monitor enter/exit [issue 2951403]

Merge commit '6ba7529b233837a243cbdb4a6fd62520ab60a22f' into dalvik-dev

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

14 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 8ff39e40: am 19cbe64f: am fe1d6d58: Add option for specifying wall-clock in method...
Andy McFadden [Wed, 25 Aug 2010 22:30:09 +0000 (15:30 -0700)]
am 8ff39e40: am 19cbe64f: am fe1d6d58: Add option for specifying wall-clock in method profiling.

Merge commit '8ff39e40289655e7798c33d21e200dc51e071e51' into dalvik-dev

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

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 agoMerge "Add option for specifying wall-clock in method profiling." into dalvik-dev
Andy McFadden [Wed, 25 Aug 2010 21:54:04 +0000 (14:54 -0700)]
Merge "Add option for specifying wall-clock in method profiling." into dalvik-dev

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.

Change-Id: Ib8884027c0a7e93044a3284802b176ea991387b5

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

Merge commit 'e73e9bc2dbd89ae67a0b90d6e02c6e8dc24c4c50' into dalvik-dev

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

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 agoMerge "Revert "JIT: Disable inlining to work around sholes boot crash"" into dalvik-dev
Ben Cheng [Wed, 25 Aug 2010 20:34:56 +0000 (13:34 -0700)]
Merge "Revert "JIT: Disable inlining to work around sholes boot crash"" into dalvik-dev

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.

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

Merge commit 'b8ee7ac2b7ebf439a988586d20c8288f95692f7e' into dalvik-dev

* commit 'b8ee7ac2b7ebf439a988586d20c8288f95692f7e':
  Change the way thread suspension works.

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

Merge commit 'a6dcf00e1a4a3b043559965f0d4fd0fbded72102' into dalvik-dev

* commit 'a6dcf00e1a4a3b043559965f0d4fd0fbded72102':
  Fix a DDMS thread monitoring crash.

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 agoMerge "Change the way thread suspension works." into dalvik-dev
Andy McFadden [Wed, 25 Aug 2010 19:04:15 +0000 (12:04 -0700)]
Merge "Change the way thread suspension works." into dalvik-dev

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.

Change-Id: I05c22ac5307fa3056fab854dfeed7aa1d76542f4

14 years agoMerge "Fix a DDMS thread monitoring crash." into dalvik-dev
Andy McFadden [Tue, 24 Aug 2010 22:07:01 +0000 (15:07 -0700)]
Merge "Fix a DDMS thread monitoring crash." into dalvik-dev

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.

Change-Id: I3cd5501e99278d68897f8e50f316f8a37620ca0b

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

Merge commit '6f95c2751db9d029ea76491e4223919513cec370' into dalvik-dev

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

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

Merge commit 'a8684380356fd9a6c01b28675c5c6d37e640c688' into dalvik-dev

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

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 agoMerge "Intrinsics for float/int and double/long conversions." into dalvik-dev
Elliott Hughes [Tue, 24 Aug 2010 17:40:01 +0000 (10:40 -0700)]
Merge "Intrinsics for float/int and double/long conversions." into dalvik-dev

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

Merge commit '042876deaa858c1087285366db0a4971917a431e' into dalvik-dev

* commit '042876deaa858c1087285366db0a4971917a431e':

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 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.

Bug: 2935622
Change-Id: I0f9e564f1f94ccf6596a37a6f1c10253481d5062

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 a18a7965: libdl should not be included in the simulator build
Brian Carlstrom [Mon, 23 Aug 2010 15:28:49 +0000 (08:28 -0700)]
am a18a7965: libdl should not be included in the simulator build

Merge commit 'a18a79655d6742a7a21764c8d84013c84e012ced' into dalvik-dev

* commit 'a18a79655d6742a7a21764c8d84013c84e012ced':
  libdl should not be included in the simulator 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 agoam 3c4760fe: am 1310319f: am 3e9bfe0b: Support dalvikvm on a Linux x86 host
Jesse Wilson [Mon, 23 Aug 2010 07:02:56 +0000 (00:02 -0700)]
am 3c4760fe: am 1310319f: am 3e9bfe0b: Support dalvikvm on a Linux x86 host

Merge commit '3c4760fe40ea292c0cadd4aad6b33f6d0eafeeb3' into dalvik-dev

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

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 agoam 95a48a0b: manual merge
Jean-Baptiste Queru [Sat, 21 Aug 2010 02:08:26 +0000 (19:08 -0700)]
am 95a48a0b: manual merge

Merge commit '95a48a0bdcdcd63d4323fa7a970ec5aafbc81bda' into dalvik-dev

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

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 agoMerge "JIT: Disable inlining to work around sholes boot crash" into dalvik-dev
buzbee [Fri, 20 Aug 2010 19:05:28 +0000 (12:05 -0700)]
Merge "JIT: Disable inlining to work around sholes boot crash" into dalvik-dev

14 years agoMerge "Consistently refer to the mark context as ctx." into dalvik-dev
Carl Shapiro [Fri, 20 Aug 2010 18:35:54 +0000 (11:35 -0700)]
Merge "Consistently refer to the mark context as ctx." into dalvik-dev

14 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.

Change-Id: Id34e414ea33c97526c20a68104e0dfe75104f85f

14 years agoJIT: Disable inlining to work around sholes boot crash
buzbee [Fri, 20 Aug 2010 18:08:12 +0000 (11:08 -0700)]
JIT: Disable inlining to work around sholes boot crash

There's no clear smoking gun, but I suspect the dalvik-dev
system-server boot crash on sholes devices is related to inlining.
Disabling inlining makes the problem go away (but so does a lot
of other small changes - so the jury is still out).

Change-Id: I5d0734f15c677cea55c5ddf5eef389101fb76a74

14 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.

Change-Id: Ie254422097d75f11a6baedb91a4fd94eeabc184e

14 years agoMerge "Combine a typedef with a struct declaration." into dalvik-dev
Carl Shapiro [Fri, 20 Aug 2010 17:12:03 +0000 (10:12 -0700)]
Merge "Combine a typedef with a struct declaration." into dalvik-dev

14 years agoMerge "Fix the exception thrown by getDeclaredFields if the class is unavailable...
Jesse Wilson [Fri, 20 Aug 2010 00:39:44 +0000 (17:39 -0700)]
Merge "Fix the exception thrown by getDeclaredFields if the class is unavailable." into dalvik-dev

14 years agoFix the exception thrown by getDeclaredFields if the class is unavailable.
Jesse Wilson [Fri, 20 Aug 2010 00:11:14 +0000 (17:11 -0700)]
Fix the exception thrown by getDeclaredFields if the class is unavailable.

http://b/issue?id=2634005

14 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.

Change-Id: I5bc2415bc6a5da542435c4e96c4eaf2d375e2503

14 years agoMinor nio cleanup.
Elliott Hughes [Thu, 19 Aug 2010 22:13:14 +0000 (15:13 -0700)]
Minor nio cleanup.

Remove an unused cached jmethodID from "Jni.c", and change "CheckJni.c" to
use the same direct field access that "Jni.c" was already using. (I noticed
this when removing the otherwise unused PlatformAddress.toLong method from
libcore.)

Also remove the now-meaningless double check that the direct field access
works.

Change-Id: I9ef3d5a0e2fd4feafc3925004cacb46fa9f28c17

14 years agoMerge "Properly handle volatile field accesses from JNI." into dalvik-dev
Andy McFadden [Thu, 19 Aug 2010 22:35:06 +0000 (15:35 -0700)]
Merge "Properly handle volatile field accesses from JNI." into dalvik-dev

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.

Change-Id: Ib18ed1ce136eef03120ae70cacc39aa33df1490a

14 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.

Change-Id: Ia8e4f1681222f5f0982c4aa19a245c1fc87e6df4