7cd6760f7045d771faae8080a8c6150bf678f679 |
|
04-May-2012 |
Elliott Hughes <enh@google.com> |
Make libjavacore independent of libnativehelper for the PDK. Bug: 6369821 Change-Id: Ie038571a5dac1f301c0c3c6fb84df432e67b62c0
|
6523532145f06d8c208ed7a9374d3ab6d8132e66 |
|
14-Dec-2010 |
Elliott Hughes <enh@google.com> |
More serialization performance improvements. Cache more work and don't use a Map of Integers for a range of integers that's defined to be dense, just because they don't start at 0. Bug: http://code.google.com/p/android/issues/detail?id=13138 Change-Id: Ie73d0bb946892f86165fca78da10bbcf64322570
|
e22935d3c7040c22b48d53bd18878844f381287c |
|
13-Aug-2010 |
Elliott Hughes <enh@google.com> |
Remove most of our C-style casts. After being burned by an incorrect C-style cast that cast away const, I've been keen to remove them all and turn on -Wold-style-cast. This patch doesn't get us that far, but it does kill the majority of our C-style casts. In turn, the majority of the casts that it removes are the ones from our tables of native methods to be registered. The new NATIVE_METHOD macro also _enforces_ our convention of using the "Class_nativeMethod" style of naming. Mostly this works out fine. In some cases (most notably ExpatParser and ExpatAttributes) I've had to un-overload a few functions, but I don't like overloading anyway, and in the particular case of a native method, where the stack trace doesn't show a line number, overloading makes it one step harder to work out which native method you're actually in. So good riddance to that. The only unfortunate case is Math.copySign, where there are two overloads corresponding to copysign(3) and copysignf(3). I had to add an extra layer of indirection there. In my defense, we've never shipped these functions before, they're unlikely to become anyone's hotspot, and the right fix is to be doing such trivial work on the Java side anyway, with intrinsics making the conversion between float/double and int/long cheap. This patch also replaces other C-style casts, primarily in "OSNetworkSystem.cpp". This patch also removes unnecessary uses of the "struct" keyword. This patch also fixes a "may be used uninitialized" warning (now error) in the sim build for "ICU.cpp". The remaining C-style casts are in the hairy float-parsing code. That stuff -- and turning on -Wold-style-cast -- will have to wait for another day. Change-Id: I9b3ee14aefd4676f980f6a7ca757595d78d80e6a
|
a9f5c16a864ff63ba63f810410f8a27c086d5d52 |
|
17-Jun-2010 |
Elliott Hughes <enh@google.com> |
Remove dynamic calls to FindClass. Initially, I was just fixing a threading bug in NativeDecimalFormat.cpp where we were bypassing GCC's built-in static initializer thread safety. This led me to the question of how expensive FindClass is, which led me to creating a new canonical cache of jclasses. Here's the motivating benchmark, showing the cost of calling an empty regular (non-native) method, an empty native method, a native method that calls FindClass, a native method that calls FindClass and GetFieldID, and a native method that calls FindClass and GetMethodID: benchmark ns logarithmic runtime NoArgsRegular 74 |||||||||||||| NoArgsNative 428 XX||||||||||||||||||| FindClass 3064 XXXXXXXXXXXXXXXX||||||||||| FindClassGetField 3654 XXXXXXXXXXXXXXXXXXX||||||||| FindClassGetMethod 5634 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Change-Id: I41ab2b347895f043a7e21d8fa19e4541e198c3fc
|
abf945fb9ce99d8c2769ac5b2691b2732fa59887 |
|
04-Jun-2010 |
Elliott Hughes <enh@google.com> |
Bullet-proof the lseek/read in Inflater.setFileInput. Also document why that non-API method exists, and that we don't have benchmarks to support the claimed optimization. Also be more consistent about setting LOG_TAG, and fix a few old-school copyright headers. Change-Id: If9fdc4583eaf91275ed44e2dc56174819d1913d0
|
ec2f5930802944b7e418bb97849071f538b2523c |
|
08-May-2010 |
Brian Carlstrom <bdc@google.com> |
Moving most libcore .c files to .cpp This change moves most of the libcore .c files to .cpp enough for them to compile. This was largely motivated by the desire to avoid using things like __attribute__ ((unused)) in .c files to supress warnings in a recent change. Change-Id: Ib967d9e16764ff805764e81362f945332080a06c
|