| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Bug: 20275572
Change-Id: I958056f757f095ad6278624e293a5583d9cee822
|
|
|
|
|
|
| |
Bug: 19537384
Change-Id: I155f3db741bdac96f1ecb1ccb15b31faab85e819
(cherry picked from commit 959a23e37abdfa26059e3770eacfe36dea8fc01c)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The presence of the build-time flags appears to cause ICU4C
to open the .dat file again as a fallback if it fails to
find a config value. This is even though the .dat file is
explicitly mapped using udata_setCommonData().
Bug: 19960867
Bug: 19961406
(cherry-picked from commit 79fdcc64ea2d9234f258dac57f04b1017a573311)
Change-Id: I03f0f2d661dd2de2b0db085519159f7deb60816d
|
|
|
|
|
| |
bug: https://code.google.com/p/android/issues/detail?id=171099
Change-Id: I8425d8289839579f1122c61a61ea403f3a7c49fb
|
|
|
|
|
|
|
| |
For some reason, this was made empty but not removed in
83c7414449bc406b.
Change-Id: I9a2b613d2281db450e46aa824ce3a6a865fddb8c
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I55314ceb906d0bf7e78545dcd9bc3489a5baf03f
|
|/
|
|
|
|
|
| |
Previously this was a 32-bit value being shifted up to 63 bits, which
is undefined behavior.
Change-Id: I99bb38508937f7a33d5c2c841b7cc32d5f374ef9
|
|
|
|
|
|
|
|
| |
This isn't public API, and isn't related to NIO. It's only ever
used by java.lang.String.
bug: 10898787
Change-Id: I4e194406746b88ba7268c2553e467e7e05400b40
|
|
|
|
|
|
| |
No need for native code here.
Change-Id: Iaeb0369b5638a6681fd94fd999641801719aaea2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Information below from the existing benchmarks on a hammerhead. All
times given in microseconds. Note that the new version is slower,
but this is a small difference in absolute terms and means less
maintenance for libcore.
The ICU team is rewriting some of the underlying code in ICU4J
for a future ICU release which may alter performance.
ICU4C + JNI
DateIntervalFormat_formatDateRange_DATE 67.8
DateIntervalFormat_formatDateRange_DATE_TIME 76.0
DateIntervalFormat_formatDateRange_TIME 54.8
ICU4J
DateIntervalFormat_formatDateRange_DATE 179
DateIntervalFormat_formatDateRange_DATE_TIME 181
DateIntervalFormat_formatDateRange_TIME 167
ICU4C + JNI
RelativeDateTimeFormatter_getRelativeDateTimeString 151.6
RelativeDateTimeFormatter_getRelativeDateTimeString_ABBREV 169.0
RelativeDateTimeFormatter_getRelativeTimeSpanString 27.8
RelativeDateTimeFormatter_getRelativeTimeSpanString_ABBREV 27.7
ICU4J
RelativeDateTimeFormatter_getRelativeDateTimeString 366.5
RelativeDateTimeFormatter_getRelativeDateTimeString_ABBREV 377.6
RelativeDateTimeFormatter_getRelativeTimeSpanString 23.2
RelativeDateTimeFormatter_getRelativeTimeSpanString_ABBREV 22.9
Bug: 20127691
Change-Id: I1ebc08fd9c974743026ae1e6c848fb4de8aa0e48
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: 19941636
Change-Id: Id587be99f645978c2e1067c9f8eef26d6d63ec27
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Note that we need manual range checks in our wrapper because
the ICU4J implementation will clamp offsets to either end of
the input text.
benchmark results :
text benchmark us linear runtime
LIPSUM BreakIterator 326.02 =====
LIPSUM IcuBreakIterator 333.47 ======
LONGPARA BreakIterator 227.67 ====
LONGPARA IcuBreakIterator 228.68 ====
GERMAN BreakIterator 79.09 =
GERMAN IcuBreakIterator 81.30 =
THAI BreakIterator 1654.11 ==============================
THAI IcuBreakIterator 1646.75 =============================
THAI2 BreakIterator 44.28 =
THAI2 IcuBreakIterator 42.67 =
TABS BreakIterator 12.79 =
TABS IcuBreakIterator 12.53 =
ACCENT BreakIterator 16.26 =
ACCENT IcuBreakIterator 15.37 =
EMOJI BreakIterator 17.71 =
EMOJI IcuBreakIterator 18.34 =
SPACES BreakIterator 16.86 =
SPACES IcuBreakIterator 15.78 =
EMPTY BreakIterator 9.22 =
EMPTY IcuBreakIterator 9.96 =
NEWLINE BreakIterator 11.08 =
NEWLINE IcuBreakIterator 9.96 =
BIDI BreakIterator 19.54 =
BIDI IcuBreakIterator 18.96 =
Change-Id: I72023dd605da8e33974aa3181506f0d9c7bc180e
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Android has two sources of timezone data: one used by
bionic / libcore code, and one used by ICU.
When ICU4J is added more tests can be added to confirm
that ICU4C and ICU4J agree on time zone and other sources
of data like CLDR and the ICU version itself.
Bug: 19941636
Change-Id: I614392a876e19a55e362489f142eec71beaf5547
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The move from to gcc 4.8 to gcc 4.9 for arm32 introduced a bug in this
code. The original code is trying to out smart the compiler by arch, but
we got caught. Running benchmarks, the amount of time we save by doing this
is in the nanosecond range, so just let the compiler figure things out on
it's own.
It turns out for aarch64, x86, x86_64, two of the functions produce exactly
the same code. For swapLongs, x86/x86_64 produces slightly different code
but is about the same performance.
For arm32, letting the compiler optimize also leads to about the same
performance.
Adding unit tests and benchmark code for these.
Bug: 19692084
Change-Id: I858eb3147ef1e9e2c1894ddb226cdddcc0baf933
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This lets us turn off warnings for a small segment of the code
instead of the entire project.
bug: 19823499
Change-Id: I9309e9a33bddc33e8c100a49416e95b2a56e2385
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In libcore_icu_NativeIDN.cpp there are calls to the deprecated IDNA2003
API which means that this code as of ICU55 no longer will compile
without specifying the -Wno-deprecated-declarations compiler flag.
bug: 19823499
Change-Id: Id5cd5da0d6c3ce62a5c642c99364d29eaebe7709
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When converting between sockaddr_ll and PacketSocketAddress, we
use ntohs in both directions. Converting from sockaddr_ll to
PacketSocketAddress should use ntohs instead.
This doesn't actually affect anything, because ntohs and htons
identical, but it is conceptually wrong.
Change-Id: Idd3cfcc11c4d6b7fed0c4b75a7935547f67eda12
|
|/ /
| |
| |
| | |
Change-Id: I0e36d41a822db1b9607543a9033f190eed5363c8
|
| |
| |
| |
| | |
Change-Id: I90bbc9661b0a48bb19c9c1c5aa4cd493f4dff2fa
|
| |
| |
| |
| |
| | |
Bug: 19704592
Change-Id: Ic424e4c36f6de028df4a3095f57a08b68da78033
|
| |
| |
| |
| |
| |
| |
| |
| | |
Only the byte[] version for now. The ByteBuffer version will be
added later.
Bug: 19704592
Change-Id: I35c5f305b5828ff3315e42aae72aa4b01839e2fc
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently, it's possible to create AF_INET sockets using:
Libcore.os.socket(AF_INET, ...
but such sockets can't be used for anything, because os.bind()
and os.connect() automatically convert IPv4 addresses to
IPv4-mapped addresses (e.g., 192.0.2.1 to ::ffff:192.0.2.1),
and passing a sockaddr_in6 to a system call on an AF_INET socket
causes the kernel to return EAFNOSUPPORT.
When this happens, retry using an unmapped IPv4 address. We
could also call getsockopt(SOL_SOCKET, SO_DOMAIN) before every
system call and pass in the appropriate socket address
structure, but that would cause these socket functions to make
two system calls instead of one and would probably halve the
performance of sendto(). This way, there's only one system call
for most sockets (including all AF_INET6 sockets created in
Java), and two system calls only in the rare case of a socket
that's explicitly created as AF_INET.
Bug: 18558481
Bug: 19704592
Change-Id: I71b3728b6a72b742e156d4c60db65e88b9a9e51e
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The helper function createWithLastResortData() was introduced in ICU 4.8
and eliminates the need to call the private default constructor:
http://bugs.icu-project.org/trac/ticket/7392
Change-Id: I6d615b23c28c449442aeab6d37b7d92e844a7ae8
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Additionally:
- support bind and connect calls with SocketAddresses
- getsockname and getpeername can return a NetlinkSocketAddress
Developed in conjunction with:
https://android-review.googlesource.com/135490
Bug: 18581716
Change-Id: I760a06cdb9bdb26c734fb02cf668a94de982e2b6
|
|/ /
| |
| |
| |
| | |
Bug: 15350832
Change-Id: I8d84f3e50b643806ccf01190797c69ce6445b539
|
|/
|
|
|
|
|
|
|
|
| |
Expose ST_* constants via OsConstants. Without these constants being
exposed, it's impossible to meaningfully use StructStatVfs.f_flag
returned from the Os.statvfs() call.
For now, @hide the new constants.
Change-Id: I82536521972e9e87a1936dd712b9e8153d120cc1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rewrite the DateUtils' relative time formatting APIs
(getRelativeTimeSpanString, getRelativeDateTimeString) to use ICU ones.
Two APIs that take withPreposition parameter are not changed. Because
(a) ICU doesn't provide functionality to format preposition; (b) They
are not really computing relative time but instead calling
formatDateRange() to get the absolute time/date string.
Benchmark results on aosp_hammerhead-userdebug:
before:
benchmark us linear runtime
DateUtils_getRelativeDateTimeString 127.1 ==========================
DateUtils_getRelativeDateTimeString_ABBREV 145.0 ==============================
DateUtils_getRelativeTimeSpanString 28.0 =====
DateUtils_getRelativeTimeSpanString_ABBREV 27.9 =====
now:
benchmark us linear runtime
RelativeDateTimeFormatter_getRelativeDateTimeString 119.2 ==========================
RelativeDateTimeFormatter_getRelativeDateTimeString_ABBREV 133.8 ==============================
RelativeDateTimeFormatter_getRelativeTimeSpanString 24.6 =====
RelativeDateTimeFormatter_getRelativeTimeSpanString_ABBREV 24.7 =====
Bug: 19146457
Bug: 5252772
Change-Id: Ief74608354964a17e42191d7b1a58964f3a9acfd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The underlying inflate & deflate can process any amount of data
correctly, since the protocol is chunk based (the size of each
chunk is limited to 32 bits, usually) and there is no limit to
the number of chunks.
On LP32, the stream counters are limited to 32 bit counts and
the manual recommends that the caller maintain their own counters
to support larger counts.
<quote>
Note however that the strm.total_in and strm_total_out counters may be
limited to 4 GB. These counters are provided as a convenience and are
not used internally by inflate() or deflate(). The application can
easily set up its own counters updated after each call of inflate()
or deflate() to count beyond 4 GB.
</quote>
Change-Id: I066e1141935154773360c1b9f94c56bd604f8474
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Don't allow glibc's TEMP_FAILURE_RETRY on 32 bit hosts, it will
truncate 64 bit return types such as from lsee64, sendfile etc.
Change-Id: I009510a69ec80d42a17192bf960b056456bd88f5
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch provide the additional check for “z”.
The “if” statement checks whether the double precision value z, is at the end of a binade
(a term used to describe the set of numbers in a binary IEEE 754 floating-point format that
all have the same exponent, i.e., a binade is the interval [2n, 2n+1) for some value of n.)
If so, it needs to adjust for the change of ulp (unit of least precision is the spacing
between two consecutive floating-point numbers, i.e., the value the least significant digit
represents if it is 1). The adjustment is done by the “simpleShiftLeftHighPrecision” routine.
This is all necessary, except when z is close to denormal (i.e. DOUBLE_TO_LONGBITS(z)==DOUBLE_NORMAL_MASK)
where no adjustment is needed since the ulp should remain the same once z becomes denormal.
This means we can remove the old hack that counted how many times we'd
incremented or decremented, so this patch removes the DECREMENT_DOUBLE
and INCREMENT_DOUBLE macros.
This patch also contains the float equivalent of everything mentioned above,
plus some new tests.
Finally, this patch removes the USE_LL conditional compilation because it
was always true.
Bug: 18087920
Change-Id: I4a9112f012dfd9eeb8db89f0652528b6c02e8f1e
Signed-off-by: Jingwei Zhang <jingwei.zhang@intel.com>
Signed-off-by: Mingwei Shi <mingwei.shi@intel.com>
|
|
|
|
|
|
|
|
|
|
| |
fcntlLong works too, but only because of the syscall conventions
happen to place the lower 32 bits of our jlong in the right register.
This change also gets rid of fcntlLong because there aren't any
documented fcntl calls that take a 64 bit integer argument.
Change-Id: I8d187d5b906195fc663675a07a5f116dcd210d16
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Hidden for now, for use from the frameworks.
Change-Id: I30d95b28ecbc422aaa5bf28fb2f288c3ca026493
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Iterating over a list of ZipEntries might otherwise do more
work than necessary and create unnecessary garbage. Also, this
is the idiom for such JNI code.
Change-Id: I869289a32e0822bab9ca0345cdc3fc5aaa8adc7e
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The original logic was accidentally inverted. This prevented sockets
from being untagged, which would result in cancelled requests stalling
out with sub-optimal TCP ZeroWindow detection instead of sending RST
packets.
Add a comment explaining how this works.
Switch from SO_ERROR (which has a side-effect) to SO_DEBUG (which doesn't).
Add a unit test.
Bug: 18706592
Change-Id: Ib822a9727668908e04f87a6deb104dcebf333f05
|
|
|
|
|
| |
Bug: 18719692
Change-Id: I91a943369bc3b331e7e06e758f729b008c3c041c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It turns out that while GCC doesn't care, clang is unhappy with us
because it notices that we're comparing an unsigned value (like a uid_t)
against -1:
libcore/luni/src/main/native/libcore_io_Posix.cpp:727:12: error: comparison
of integers of different signs: 'typeof (getegid())' (aka 'unsigned int')
and 'int' [-Werror,-Wsign-compare]
return TEMP_FAILURE_RETRY(getegid());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Bug: 18759467
Change-Id: If71b11cbdd0cda2b8efcc1706eb49856c3770bb8
|
|
|
|
|
| |
Bug: 18759467
Change-Id: Ia5b97a55318b5990ad6b80d15641223aa4fb06f5
|
|
|
|
|
|
| |
These are all picked up by virtue of the libraries that we use.
Change-Id: Ib5e86c65d53f3448d5f1d0c0d24f0f63ef5f1868
|
|
|
|
| |
Change-Id: I94d85f1848db7c787f423ca9e7f7695ffd754a56
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I164eb9083cc17f858dcbb0da046184440881395d
|