- 11 Sep, 2015 1 commit
-
-
Mathieu Chartier authored
Usage replaces most SuspendAll and ResumeAll calls. Change-Id: I355683a5365876242cea85a656dcb58455f7a294
-
- 04 Sep, 2015 1 commit
-
-
Mathieu Chartier authored
Fixes the TransitionFromRunnableToSuspended and TransitionFromSuspendedToRunnable pattern that was prone to errors. Change-Id: Ie6ae9c0357c83b4fc4899d05dfa0975553170267
-
- 22 Jul, 2015 1 commit
-
-
Mathieu Chartier authored
Also enable -Wthread-safety-negative. Changes: Switch to capabilities and negative capabilities. Future work: Use capabilities to implement uninterruptible annotations to work with AssertNoThreadSuspension. Bug: 20072211 Change-Id: I42fcbe0300d98a831c89d1eff3ecd5a7e99ebf33
-
- 02 Jun, 2015 1 commit
-
-
Mathieu Chartier authored
Optimizing + quick tests are passing, devices boot. TODO: Test and fix bugs in mips64. Saves 16 bytes per most ArtMethod, 7.5MB reduction in system PSS. Some of the savings are from removal of virtual methods and direct methods object arrays. Bug: 19264997 (cherry picked from commit e401d146) Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d Fix some ArtMethod related bugs Added root visiting for runtime methods, not currently required since the GcRoots in these methods are null. Added missing GetInterfaceMethodIfProxy in GetMethodLine, fixes --trace run-tests 005, 044. Fixed optimizing compiler bug where we used a normal stack location instead of double on ARM64, this fixes the debuggable tests. TODO: Fix JDWP tests. Bug: 19264997 Change-Id: I7c55f69c61d1b45351fd0dc7185ffe5efad82bd3 ART: Fix casts for 64-bit pointers on 32-bit compiler. Bug: 19264997 Change-Id: Ief45cdd4bae5a43fc8bfdfa7cf744e2c57529457 Fix JDWP tests after ArtMethod change Fixes Throwable::GetStackDepth for exception event detection after internal stack trace representation change. Adds missing ArtMethod::GetInterfaceMethodIfProxy call in case of proxy method. Bug: 19264997 Change-Id: I363e293796848c3ec491c963813f62d868da44d2 Fix accidental IMT and root marking regression Was always using the conflict trampoline. Also included fix for regression in GC time caused by extra roots. Most of the regression was IMT. Fixed bug in DumpGcPerformanceInfo where we would get SIGABRT due to detached thread. EvaluateAndApplyChanges: From ~2500 -> ~1980 GC time: 8.2s -> 7.2s due to 1s less of MarkConcurrentRoots Bug: 19264997 Change-Id: I4333e80a8268c2ed1284f87f25b9f113d4f2c7e0 Fix bogus image test assert Previously we were comparing the size of the non moving space to size of the image file. Now we properly compare the size of the image space against the size of the image file. Bug: 19264997 Change-Id: I7359f1f73ae3df60c5147245935a24431c04808a [MIPS64] Fix art_quick_invoke_stub argument offsets. ArtMethod reference's size got bigger, so we need to move other args and leave enough space for ArtMethod* and 'this' pointer. This fixes mips64 boot. Bug: 19264997 Change-Id: I47198d5f39a4caab30b3b77479d5eedaad5006ab
-
- 30 May, 2015 1 commit
-
-
Mathieu Chartier authored
Optimizing + quick tests are passing, devices boot. TODO: Test and fix bugs in mips64. Saves 16 bytes per most ArtMethod, 7.5MB reduction in system PSS. Some of the savings are from removal of virtual methods and direct methods object arrays. Bug: 19264997 Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d
-
- 11 May, 2015 1 commit
-
-
Nicolas Geoffray authored
The flag tells whether the stack walk needs to include inlined Java frames. This does not do anything just yet, as we're not inlining anyways. Change-Id: I716e25094fe56fa335ca1f9a398c1bcdba478e73
-
- 22 Apr, 2015 1 commit
-
-
Brian Carlstrom authored
- Add test for Class.forName(..., ..., null) - Simplify VMStack.getClosestUserClassLoader based on new behavior of Class.forName(..., ..., null) Change-Id: I6bc470e20fa177e8a3debe55c90a84eef7ef518e
-
- 12 Nov, 2014 1 commit
-
-
Ian Rogers authored
The thread doing the suspension doesn't attempt to suspend the other thread unless it knows another thread isn't trying to suspend it. Use the suspend count, and its lock, for this purpose. Re-enable ThreadStress test. Bug: 15446488 Change-Id: Idd34410c7b89d8abd6973e5699a15ca699472c78
-
- 05 Nov, 2014 1 commit
-
-
Andreas Gampe authored
Enable -Wno-conversion-null, -Wredundant-decls and -Wshadow in general, and -Wunused-but-set-parameter for GCC builds. Change-Id: I81bbdd762213444673c65d85edae594a523836e5
-
- 28 Aug, 2014 2 commits
-
-
Brian Carlstrom authored
When suspending a thread by peer the invariant that only attached threads are suspended must be maintained. Add a ThreadList::Contains check which requires making this method non-static. Add some extra thread logging. Bug: 17302037 (cherry picked from commit 37c16453) Change-Id: I51832785d4b4b431e035318e75635f442e89a1fb
-
Brian Carlstrom authored
When suspending a thread by peer the invariant that only attached threads are suspended must be maintained. Add a ThreadList::Contains check which requires making this method non-static. Add some extra thread logging. Bug: 17302037 Change-Id: I89af9840e398c2ceadeb736c431dfe3be8f3ba06
-
- 14 Aug, 2014 1 commit
-
-
Andreas Gampe authored
Bug: 16867274 Change-Id: I5466af563032041ef4a547894f40f303871302c6
-
- 13 Aug, 2014 1 commit
-
-
Andreas Gampe authored
When the call stack does not have the three methods we expect, the visitor will return a nullptr value. Add a test to JniTest (and refactor the test a little for code reuse). Bug: 16867274 Change-Id: I5fb8f91f372a41e0bc11ef9f70640834591afa53
-
- 14 Aug, 2014 2 commits
-
-
Andreas Gampe authored
Bug: 16867274 (cherry picked from commit ab61295e) Change-Id: I5466af563032041ef4a547894f40f303871302c6
-
Andreas Gampe authored
When the call stack does not have the three methods we expect, the visitor will return a nullptr value. Add a test to JniTest (and refactor the test a little for code reuse). Bug: 16867274 (cherry picked from commit 61bf6a1c) Change-Id: I5fb8f91f372a41e0bc11ef9f70640834591afa53
-
- 18 Jul, 2014 2 commits
-
-
Ian Rogers authored
Don't allow more than one concurrent single thread suspension to avoid potential cycles and deadlocks where threads try to suspend each other. Bug: 16364458, 16354227 Change-Id: I907f1d5591a6aa5c241d37d6b4a34f968f98df77
-
Ian Rogers authored
Don't allow more than one concurrent single thread suspension to avoid potential cycles and deadlocks where threads try to suspend each other. Bug: 16364458, 16354227 (cherry picked from commit f3d874c6) Change-Id: I907f1d5591a6aa5c241d37d6b4a34f968f98df77
-
- 02 Apr, 2014 1 commit
-
-
Sebastien Hertz authored
Updates Thread::CreateInternalStackTrace to support both transactional and non-transactional modes using template. Generalizes non-transactional mode for invariant fields (which are set only once). Removes ArrayLog::VisitRoots as we never create Array logs of ObjectArray. As ObjectArray elements are set using Object::SetFieldObject, they are already recorded in the object logs: the object is the array itself and the offset corresponds to the element index in this array. And also checks we never log ObjectArray in array logs. Fixes location of thrown exception when calling native method during class initialization. Change-Id: Idbc368d3b8292b85ff40bc8a7c559e085477bf89
-
- 14 Mar, 2014 1 commit
-
-
Ian Rogers authored
Move invocation code out of JNI internal into reflection, including ArgArray code. Make reflective invocation use the ArgArray to build arguments rather than allocating a jvalue[] and unboxing arguments into that. Move reflection part of jni_internal_test into reflection_test. Make greater use of fast JNI. Change-Id: Ib381372df5f9a83679e30e7275de24fa0e6b1057
-
- 07 Feb, 2014 1 commit
-
-
Ian Rogers authored
Modify mirror objects so that references between them use an ObjectReference value type rather than an Object* so that functionality to compress larger references can be captured in the ObjectRefererence implementation. ObjectReferences are 32bit and all other aspects of object layout remain as they are currently. Expand fields in objects holding pointers so they can hold 64bit pointers. Its expected the size of these will come down by improving where we hold compiler meta-data. Stub out x86_64 architecture specific runtime implementation. Modify OutputStream so that reads and writes are of unsigned quantities. Make the use of portable or quick code more explicit. Templatize AtomicInteger to support more than just int32_t as a type. Add missing, and fix issues relating to, missing annotalysis information on the mutator lock. Refactor and share implementations for array copy between System and uses elsewhere in the runtime. Fix numerous 64bit build issues. Change-Id: I1a5694c251a42c9eff71084dfdd4b51fff716822
-
- 20 Oct, 2013 1 commit
-
-
Ian Rogers authored
Use a modifier to signal a native method is a fast JNI method. If the modifier is set then don't perform runnable transitions. Change-Id: I7835b4d837bfdd1cb8e2d54b919c0d5e6cf90499
-
- 02 Oct, 2013 1 commit
-
-
Ian Rogers authored
Bug 6961405. Don't inflate monitors for Notify and NotifyAll. Tidy lock word, handle recursive lock case alongside unlocked case and move assembly out of line (except for ARM quick). Also handle null in out-of-line assembly as the test is quick and the enter/exit code is already a safepoint. To gain ownership of a monitor on behalf of another thread, monitor contenders must not hold the monitor_lock_, so they wait on a condition variable. Reduce size of per mutex contention log. Be consistent in calling thin lock thread ids just thread ids. Fix potential thread death races caused by the use of FindThreadByThreadId, make it invariant that returned threads are either self or suspended now. Code size reduction on ARM boot.oat 0.2%. Old nexus 7 speedup 0.25%, new nexus 7 speedup 1.4%, nexus 10 speedup 2.24%, nexus 4 speedup 2.09% on DeltaBlue. Change-Id: Id52558b914f160d9c8578fdd7fc8199a9598576a
-
- 14 Aug, 2013 1 commit
-
-
Brian Carlstrom authored
Cherry-picked from commit ed41d5c44299ec5d44b8514f6e17f802f48094d1. Move to ArtMethod/Field instead of AbstractMethod/Field and have java.lang.reflect APIs delegate to ArtMethod/ArtField. Bug: 10014286. Change-Id: Iafc1d8c5b62562c9af8fb9fd8c5e1d61270536e7
-
- 13 Jul, 2013 1 commit
-
-
Brian Carlstrom authored
The runtime, compiler, dex2oat, and oatdump now are in seperate trees to prevent dependency creep. They can now be individually built without rebuilding the rest of the art projects. dalvikvm and jdwpspy were already this way. Builds in the art directory should behave as before, building everything including tests. Change-Id: Ic6b1151e5ed0f823c3dd301afd2b13eb2d8feb81
-
- 18 Mar, 2013 1 commit
-
-
Ian Rogers authored
Performance had regressed due to verify object and method invocation changes. Avoid trampolines for static calls in same class. Various inlining changes. Make verify object something that's only compiled-in in debug builds. Change-Id: Ia261a52232c3b10667c668f8adfadc0da3048bc5
-
- 31 Jan, 2013 1 commit
-
-
Ian Rogers authored
Break object.h into constituent files. Reduce number of #includes in other GC header files. Introduce -inl.h files to avoid mirror files #include-ing each other. Check invariants of verifier RegTypes for all constructors. Change-Id: Iecf1171c02910ac152d52947330ef456df4043bc
-
- 23 Jan, 2013 1 commit
-
-
Ian Rogers authored
This allows assertion checking on the thread, principally that we never try to walk the stack of an unsuspended thread. Fix bug in the OwnedMonitorVisitor where GetVReg could be called on a StackVisitor with no context. Change-Id: I06539b624b253b6fb7385e7be11a4bced1d417b2
-
- 10 Jan, 2013 1 commit
-
-
Elliott Hughes authored
Change-Id: Iefc276939b9e569f4ea4d7a5af9a28276a3fb632
-
- 02 Jan, 2013 1 commit
-
-
Ian Rogers authored
The deoptimization code is untested, and some sanity checks in the instrumentation are disabled because they need debugging. Change-Id: I1b60a65a60bddc9b107ad4659da097b55ce901c3
-
- 01 Dec, 2012 1 commit
-
-
Ian Rogers authored
Don't use a JNI global ref for the thread peer_ so that we can support more threads than we can global refs. This fixes run-test 51. Fix a race in thread destruction where a thread may be requested to suspend while deleting itself. Change-Id: Id8756a575becf80d2a0be0a213325034556927f1
-
- 14 Nov, 2012 1 commit
-
-
jeffhao authored
This is in preparation for Ian's debugger changes. The instrumentation still needs support for debugging, which I'll add later. Change-Id: I29ce0af1ff2eaec8f6d2f54963263381363ebf72
-
- 26 Sep, 2012 1 commit
-
-
Mathieu Chartier authored
Fixes issue where GC was freeing the java peer if the parent thread exited before the child thread got registered. Change-Id: I6fbe74865d5827d243ac55fc396679afa97ff2f9
-
- 31 Aug, 2012 1 commit
-
-
Ian Rogers authored
Also fix free space computations for DDMS. Change-Id: Icbc045b5461af89a0516f37f01acaaa815205348
-
- 14 Aug, 2012 1 commit
-
-
Ian Rogers authored
Introduce the notion of the mutators/GC being a shared-exclusive (aka reader-writer) lock. Introduce globally ordered locks, analysable by annotalysis, statically at compile time. Add locking attributes to methods. More subtly, remove the heap_lock_ and split between various locks that are held for smaller periods (where work doesn't get blocked). Remove buggy Dalvik style thread transitions. Make GC use CMS in all cases when concurrent is enabled. Fix bug where suspend counts rather than debug suspend counts were sent to JDWP. Move the PathClassLoader to WellKnownClasses. In debugger refactor calls to send request and possibly suspend. Break apart different VmWait thread states. Move identity hash code to a shared method. Change-Id: Icdbfc3ce3fcccd14341860ac7305d8e97b51f5c6
-
- 27 Jun, 2012 1 commit
-
-
Elliott Hughes authored
Handy if you have an ANR that's locking related. Quick tour: at org.apache.harmony.dalvik.NativeTestTarget.emptyJniStaticSynchronizedMethod0(Native method) - locked <0x60135aa8> (a java.lang.Class<org.apache.harmony.dalvik.NativeTestTarget>) at java.lang.reflect.Method.invoke(Native method) at C.whileTrue(Main.java:63) at C.synchronizedOnClassString(Main.java:56) - locked <0x60002a70> (a java.lang.Class<java.lang.String>) at C.nestedSynchronizationWithTryCatch(Main.java:44) - locked <0x61336b90> (a java.lang.String) - locked <0x61336bd0> (a java.lang.String) at C.nestedSynchronization(Main.java:35) - locked <0x61336b18> (a java.lang.String) - locked <0x61336b50> (a java.lang.String) at C.synchronizedOnClassC(Main.java:30) - locked <0x613366f8> (a java.lang.Class<C>) at C.noLocks(Main.java:27) at C.<clinit>(Main.java:24) - locked <0x613366f8> (a java.lang.Class<C>) at Main.main(Main.java:19) A non-static synchronized native method works too: at org.apache.harmony.dalvik.NativeTestTarget.emptyJniSynchronizedMethod0(Native method) - locked <0x613371a8> (a org.apache.harmony.dalvik.NativeTestTarget) ... Note that most stack traces don't look any different; the above is a pathological example that exercises different kinds of locking. Testing with system_server shows most threads don't hold any locks. Future work (marked by TODO) is that explicit JNI MonitorEnter calls in native code aren't shown. Change-Id: I2747f5cddb4ef64b1935736f084a68fe8e4005e9
-
- 26 Jun, 2012 1 commit
-
-
Ian Rogers authored
Move the routines for changing Object* to jobject and vice-versa (AddLocalReference and Decode) to ScopedJniThreadState to enforce use of Object*s in the Runnable thread state. In the Runnable thread state suspension is necessary before GC can take place. Reduce use of const ClassLoader* as the code bottoms out in FindClass and with a field assignment where the const is cast away (ie if we're not going to enforce the const-ness we shouldn't pretend it is). Refactor the Thread::Attach API so that we're not handling raw Objects on unattached threads. Remove some unreachable code. Change-Id: I0fa969f49ee6a8f10752af74a6b0e04d46b4cd97
-
- 22 Jun, 2012 1 commit
-
-
Ian Rogers authored
Change-Id: I5ae03a5e52111792d2df7e83cbd89ab25777844b
-
- 25 May, 2012 2 commits
-
-
Elliott Hughes authored
This way, if a runtime is restarted within a process, we re-initialize all the cached data. Conflicts: src/native/java_lang_Runtime.cc -- nativeExit lost an argument in dalvik-dev (cherry picked from commit 7756d547) Change-Id: I6184fc20c2a9ec16c4b053584a4d1c3b64452d0f
-
Elliott Hughes authored
This way, if a runtime is restarted within a process, we re-initialize all the cached data. Change-Id: Ifd441f8c84c4cff904ee62bbd6b5707ad365967d
-
- 14 Apr, 2012 1 commit
-
-
Ian Rogers authored
Change-Id: Ia9c883ba9a13b205cda7b72024e2939f02583acb
-