summaryrefslogtreecommitdiffstats
path: root/runtime/utf.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix broken checks in IsValidPartOfMemberNameUtf8Slow.Narayan Kamath2015-05-071-3/+3
| | | | | | | | | | | GetUtf16FromUtf8 returns a surrogate pair only if it encounters a 4-byte UTF sequence. Three byte UTF sequences will only return the first or second half of a pair so we need to check for that explicitly. bug: 20844537 Change-Id: Icb660fae77ac8a852fc768e6c1cd5766117e68e4
* Be more lenient with 4 byte UTF-8 sequences.Narayan Kamath2015-02-121-3/+19
| | | | | | | | | | | | | | | Accept 4 byte sequences and convert them into surrogate pairs instead of expecting 2 separate 3 byte sequences each encoding one half of a surrogate pair. Note that in addition to supporting 4 byte sequences in strings from JNI, we also tolerate them in dex files. This is mainly for consistency, and there's no need to claim any sort of official support. bug: 18848397 bug: https://code.google.com/p/android/issues/detail?id=81341 Change-Id: Ibc98d29e59d98803e640f2489ea4c56912a59b29
* Fix ImageWriter::ComputeEagerResolvedStringsCallback().Vladimir Marko2015-02-111-3/+4
| | | | Change-Id: I1a2abd6d78dd7067d9bdbadbd81dd2fd7711fbc5
* Add hash map, reduce excessive hashingMathieu Chartier2014-11-071-2/+3
| | | | | | | | | | | | | | | | | | | | | | | Changed the class def index to use a HashMap instead of unordered_map so that we can use FindWithHash to reduce how often we need to compute hashes. Fixed a bug in ClassLinker::UpdateClass where we didn't properly handle classes with the same descriptor but different class loaders. Introduced by previous CL. Before (fb launch): 1.74% art::ComputeModifiedUtf8Hash(char const*) After: 0.95% art::ComputeModifiedUtf8Hash(char const*) Bug: 18054905 Bug: 16828525 Change-Id: Iba2ee37c9837289e0ea187800ba4af322225a994 (cherry picked from commit 564ff985184737977aa26c485d0c1a413e530705)
* Reduce and speed-up class def searches.Ian Rogers2014-09-021-0/+3
| | | | | | | | | | | | | | | | | | | | Use the class linker for descriptor lookups from the compile driver so that dex caches are populated. Reduce the scope of functions for scanning class paths to just the class linker where they are performed. If we see more than a threshold number of find class def misses on a dex file lazily compute an index, so that future lookups are constant time (part of the collection code is taken from https://android-review.googlesource.com/#/c/103865/3). Note that we take a lazy approach so that we don't serialize on loading dex files, this avoids the reason the index was removed in 8b2c0b9abc3f520495f4387ea040132ba85cae69. Remove an implicit and unnecessary std::string creation for PrintableString. Single threaded interpret-only dex2oat performance is improved by roughly 10%. Bug: 16853450 Change-Id: Icf72df76b0a4328f2a24075e81f4ff267b9401f4
* Avoid use of std::string where we have const char*.Ian Rogers2014-08-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Removing the ClassHelper caused std::string creation for all calls to Class::GetDescriptor and a significant performance regression. Make the std::string an out argument so the caller can maintain it and its life time while allowing GetDescriptor to return the common const char* case. Don't generate GC maps when compilation is disabled. Remove other uses of std::string that are occuring on critical paths. Use the cheaper SkipClass in CompileMethod in CompilerDriver. Specialize the utf8 as utf16 comparison code for the common shorter byte encoding. Force a bit of inlining, remove some UNLIKELYs (they are prone to pessimizing code), add some LIKELYs. x86-64 host 1-thread interpret-only of 57 apks: Before: 29.539s After: 23.467s Regular compile: Before: 1m35.347s After: 1m20.056s Bug: 16853450 Change-Id: Ic705ea24784bee24ab80084d06174cbf87d557ad
* Enable annotalysis on clang ART builds.Ian Rogers2014-03-061-0/+1
| | | | | | | | | | | Fix clang build errors aswell as restructure locking/mutex code for correct thread safety analysis support. Reorder make dependencies so that host builds build first as they should provide better compilation errors than target. Remove host's use of -fno-omit-frame-pointer as it has no value with correct use of CFI, which we should have. Change-Id: I72cea8da9a3757b1a0b3acb4081feccb7c6cef90
* Object model changes to support 64bit.Ian Rogers2014-02-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 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
* Move hot utf routines into -inl.h.Ian Rogers2013-09-231-2/+3
| | | | Change-Id: I7050d8282a7e5870b2bf671d6867c57625e00ccc
* Fix multiple inclusion guards to match new pathnamesBrian Carlstrom2013-07-171-3/+3
| | | | Change-Id: Id7735be1d75bc315733b1773fba45c1deb8ace43
* Create separate Android.mk for main build targetsBrian Carlstrom2013-07-121-0/+97
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