| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| | |
Bug: 2980559
Change-Id: I168573c16581a3a94b96f0ccdb458bfee76f11e0
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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: I4a7d7b86b45a806021249c83ab32e52d3d53f33c
|
|\ \
| |/
|/|
| | |
dalvik-dev
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These accessors aren't buying us anything, are costing us something, and have
encouraged caching of instances in fields all over the place. Lose all that
cruft.
I think we all agree that we want to merge IFileSystem and INetworkSystem at
some point, but I'll do that some other day.
Change-Id: I07696ec9650d0395ec31a71a74300e818a3fed91
|
|/
|
|
|
|
|
|
|
| |
In Froyo and earlier, we search the system library path first. This
makes it impossible for applications to provide newer versions of
native libraries when old versions are shipped on the device.
Change-Id: I0a154e32f62a28cf841b9e8d2dbd2d9cce6f3128
http://b/issue?id=2933456
|
|
|
|
| |
Change-Id: I87b69b2c04cf14e0971c57633e229b02c3547375
|
|
|
|
| |
Change-Id: I54bb29e357812b089e83f3a2a831c80f5114a27a
|
|
|
|
|
|
|
| |
(Continuing our policy of having native methods' names correspond to the
underlying syscall, this one sadly gets the ugly name of "socket".)
Change-Id: Icf08e4e0637ee3ae9eab673d350860181f547250
|
|
|
|
|
|
| |
We can do everything in Java.
Change-Id: I7451319335a647fc25bd2d2403fa98bfc6b5c038
|
|
|
|
| |
Change-Id: I8347bc625480a1c37a1ed9976193ddfedeb00bbc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't need to copy a context structure back and forth between native code
and Java: it didn't contain anything but temporaries anyway. We don't need a
convenience method for a blocking connect with no timeout. We don't need a
separate codepath for datagram and stream sockets' connect calls.
There are further simplifications that could be made, I think. I think we
could implement "connect" in Java in terms of "connectNonBlocking" and
"isConnected" (since that's how our native implementation works anyway).
I also think we can fix the 100ms polling too, though I haven't investigated
and that may require that we fix the general "interrupt on close" problem.
Change-Id: Ib5989fa05f5dd7dd24b681fab70f856cd0bc5c56
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were using an AF_INET or AF_INET6 socket to implement the nio Pipe, which
was causing trouble for people on systems where IPv6 wasn't working yet.
This patch switches over to pipe(2). My first implementation used socketpair(2)
and retained the SocketChannelImpls, but it still seemed a bit off to be asking
for a full-duplex pipe to implement a unidirectional channel, and it required
hacks in the networking code to cope with the AF_LOCAL family, and in the
BlockGuard for the isLingeringSocket test.
This implementation uses pipe(2) and FileChannelImpl. It breaks a few tests, but
the tests are wrong, and it actually brings us closer to the RI's behavior of
throwing IOException "broken pipe" when writing to a broken pipe.
Rather than keep throwing junk into the FileSystem/NetworkSystem classes, and
resolving the question of which of those setNonBlocking belonged in (answer:
neither; this is a false Windows-style dichotomy that isn't helpful here), I've
added a new IoUtils with a few generally useful methods. The remainder of this
patch switches over existing code. We could probably make
FileDescriptor.descriptor private now I've exposed accessors, but this change
is large enough already...
Bug: 2735373
Bug: http://code.google.com/p/android/issues/detail?id=9431
Change-Id: I6b6d1e50bdddd435e71c31105a73c9d4fd135d7e
|
|
|
|
| |
Change-Id: I4733a0e266ff7c02c25033e79bcceff4d7357868
|
|\
| |
| |
| |
| |
| |
| | |
Merge commit '2ceb16144eefd78537059f0b6ad97267e843ae57' into dalvik-dev
* commit '2ceb16144eefd78537059f0b6ad97267e843ae57':
BlockGuard: don't complain about non-linger network close()
|
| |\
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
dalvik/src/main/java/dalvik/system/BlockGuard.java
Change-Id: I13e177da1f307c0f784f783c934fa4a08f6407e0
|
| | |
| | |
| | |
| | | |
Change-Id: I4a5d6383f821d0c161206684ed14d7fd4781938b
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Pass the traffic class setting down to the kernel, rather than trying to
fake it in Java and then not actually using it at all in the native code.
There are two ways to set traffic class (aka type of service, or TOS):
per-packet or per-socket. The Java API is for the per-socket style, but
the old implementation had each SocketImpl intercept calls to
SocketOptions.setOption for SocketOptions.IP_TOS, stash the traffic class
in one of the SocketImpl's private fields, skip calling native code, and
then pass the traffic class to each native method that would need it to
implement the per-packet style. Unfortunately, each of those methods was
just ignoring the traffic class.
I've removed all this interception, so we now pass the traffic class straight
to the kernel via setsockopt(2), and we don't need to pass anything to the
individual per-packet calls.
The motivation for going the per-packet route appears to have been to work
around a lack of support for the per-socket route in old versions of Linux
and other OSes. It all works now, though, so there's no point making our
lives harder (and doing more work at runtime) to work around bugs and
infelicities that no longer exist.
I tested the new code manually with tcpdump, for both IPv4 (radio) and
IPv6 (wifi), and in both cases it looks like it's doing the right thing now.
We also still pass all of our tests, though none of them are capable of
recognizing whether we're actually doing anything useful anyway...
Change-Id: Ice241e088d25037123c73733a3f2bfade976fb31
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As far as I can tell, the reason other implementations use select(2)
instead of SO_RCVTIMEO is that traditionally the latter wasn't implemented.
Stevens is unusually unspecific about the portability of SO_RCVTIMEO, but
the web says that Linux didn't support it until 2.4, and Solaris was late
and buggy too. Modern versions of Linux, Mac OS, and Windows all support
SO_RCVTIMEO, though, so portability should not be a concern for us.
This patch causes a regression; several of the blocking network I/O methods
that used to be interruptible by virtue of their select(2)-based manual
implementation of timeouts are no longer interruptible. Making all network
I/O interruptible is work in progress, covered by http://b/2823977.
Bug: http://b/2512069
Change-Id: I0a2812ca1537bd171c4205343d6b3b526b72b2b2
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This doesn't really improve File.getCanonicalPath and its helpers much, but it
improves everything else, and feels like a step in the right direction.
Benchmarking shows only a tiny difference in the uncommon case of a reused
File, and a significant increase in performance in the more likely case of
a single-use File.
Before:
benchmark us
Exists 26.14
ExistsReuse 5.08
After:
benchmark us
Exists 13.90
ExistsReuse 5.23
Bug: 2281992
Change-Id: Ibc6fd2581983ae8a57bf4b7f49196c76ad41169e
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
BlockGuardPolicyException.
Merge commit '21710cc5a3a0c7e3bd40e3621c9c9f14e97bf809' into dalvik-dev
* commit '21710cc5a3a0c7e3bd40e3621c9c9f14e97bf809':
Few tweaks to BlockGuard's BlockGuardPolicyException.
|
| |\ \
| | |/
| | |
| | |
| | |
| | |
| | | |
Merge commit '42660dc4657a7b26014810843693e714324b4db5'
* commit '42660dc4657a7b26014810843693e714324b4db5':
Few tweaks to BlockGuard's BlockGuardPolicyException.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Needed for work on StrictMode across binder calls. Will likely be
cleaned up more in the future, removing the magical stringification.
But this is currently needed at this stage.
Change-Id: I4b2b3e6a242ac62fa9847fc969749b4f2467bc71
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Similar to the change for the recv(2) code.
Unrelatedly, I've pulled out our exception-throwing helpers for reuse. This
was meant to be in a separate change, but I accidentally mixed it in.
Bug: 2823977
Change-Id: I314a4337189277b6eff65f7ccf9e897b5d0b73f2
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch simplifies the network I/O interface, in particular for read/recv.
The bounds checking from OSNetworkSystem.read goes, since the caller already
checks. (If we want that checking in native code, we should add it uniformly.)
We also remove supportsUrgentData (which was always returning true), and remove
the sole caller, so we just try the operation and report failures if they happen
rather than trying to predict the failure (as the original code seemed to want
to do, and which is never a good idea).
The native code gains logic to recognize when the FileDescriptor has been
closed from another thread, though this logic remains largely unused at this
point. (There's comment-out code in "close" that does a shutdown(2) to wake
us up so we can recognize this situation.) I've switched code over to using
the new NetFd class, but haven't ensured that we handle the wakeups correctly.
(The "read" implementation being the notable exception.) For now, with the
shutdown(2) commented out, this shouldn't have any visible behavioral changes.
(And our tests don't spot any.)
Code that was using malloc(3)/free(3) to allocate temporary buffers, and copying
to and from those buffers has been rewritten to use JNI-provided pointers onto
the heap, as part of the general "don't lie to the garbage collector" push.
The implementations for the various old forms of recv have been collapsed into
one.
Bug: 2823977
Change-Id: I05cf742c44827a24df3c1ff59727013ee4636233
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | | |
Merge commit '478f5f9576c399c30288cf79d6bbf65ca5feedfd' into dalvik-dev
* commit '478f5f9576c399c30288cf79d6bbf65ca5feedfd':
Allow heap dump requests with a FileDescriptor arg.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Part of a larger change to allow "am" to initiate hprof heap dumps.
Bug 2759474.
Change-Id: I33c41e6f2ce37d2c0348ea783ecaadc0eae33d36
|
|/ /
| |
| |
| |
| |
| |
| | |
This has never done anything, and we've no idea what -- if anything -- it was
meant to do, and it doesn't do anything upstream either, so out it goes...
Change-Id: I33a738700fd4811fe47089f0d0373ce9f0d525de
|
| |
| |
| |
| |
| |
| | |
The INetworkSystem interface has changed in master.
Change-Id: I7ab850821ba5c9e98124216dd66265570afa5196
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| | |
StrictMode work." into gingerbread
Merge commit '2eed1da5004c1f014c39f191a863c638a931cb66'
* commit '2eed1da5004c1f014c39f191a863c638a931cb66':
Add WrappedNetworkSystem to Blockguard for StrictMode work.
|
| |
| |
| |
| | |
Change-Id: Idde4b6f878fad5e8bd90fa929cb434c9a130fbcb
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Change-Id: Ifc313c130024a5dac4498b0a4c92a5a16fb75b7f
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Change-Id: Ib8e3fee69684d4418f551d0a0f68916dcf2d949b
|
|\ \
| |/
| |
| | |
Change-Id: Ie072d918eb0607d8d713ea885cbf0d353f809332
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
From the JavaDoc (even though this is a @hide class):
Mechanism to let threads set restrictions on what code is allowed
to do in their thread.
This is meant for applications to prevent certain blocking
operations from running on their main event loop (or "UI")
threads.
Note that this is all best-effort to catch most accidental
mistakes and isn't intended to be a perfect mechanism, nor provide
any sort of security.
This is just the start. Future CLs will wire this up in the framework
(giving developers some way to enable it, either via a tiny framework
API, or via their AndroidManifest.xml), add network and Binder
support, etc.
Change-Id: I212e1c8b9fa2bb9e495103e0c2fe6a998dc1f8d0
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
JavaLibrary.mk
luni/src/main/java/java/lang/System.java
luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java
luni/src/test/java/java/net/URLConnectionTest.java
support/src/test/java/tests/TestSuiteFactory.java
x-net/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp
Change-Id: I1038f749c8c9bd640aae7ca96627810936454883
|
| |
| |
| |
| |
| |
| |
| |
| | |
I also accidentally mixed two unrelated changes in here: replacing "".equals
and equals("") with String.isEmpty, and removing some dead code in
org.apache.harmony.luni.util.Util.
Change-Id: I0aaad43290b083085b3095b624caf096de487223
|
| |
| |
| |
| |
| |
| | |
Gentlemen, you may now set your editors to "strip trailing whitespace"...
Change-Id: I85b2f6c80e5fbef1af6cab11789790b078c11b1b
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| | |
Change-Id: Ied76662c470ba878cec61189acf29f5cbbd4ccd4
|
| |
| |
| |
| |
| | |
Bug: 754114
Change-Id: Iaa03def509c10cbaa12fd2128584b93d4be4a6b7
|
| |
| |
| |
| |
| | |
These APIs were deprecated in Eclair and should disappear in Gingerbread.
See bug 2553600.
|
| |
| |
| |
| |
| |
| |
| |
| | |
First step toward disabling them.
Bug 2537379.
Change-Id: I8664a5f1d7dcff11ddeb97b5e700dad76bffc723
|
| |
| |
| |
| |
| |
| |
| | |
I've fixed a few typos, and removed a few of the more egregiously nonsensical
or incorrect comments that were nearby.
Change-Id: I35851baebd532f949cc269f4738a26eeb9b6e697
|
| |
| |
| |
| |
| |
| | |
duplicated from PathClassLoader).
Change-Id: Iaf3e8a5b23df1a8bbf670bf6d6045fffef6c8fcb
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
id)."
Merge commit '3ed90a94fa2eea45a423471405df5df62b187b83' into dalvik-dev
* commit '3ed90a94fa2eea45a423471405df5df62b187b83':
Add a native method dalvik.system.VMDebug.infopoint(int id).
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Merge commit 'f854a79457ca12a18acb76070c98e622e6c660c5' into dalvik-dev
* commit 'f854a79457ca12a18acb76070c98e622e6c660c5':
remove System.*.println when ddm dispatch fails.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This adds four new instructions for accessing volatile wide fields (long
and double). The JLS requires that such accesses are atomic, but the
VM doesn't otherwise make guarantees about the atomicity of reads and
writes on 64-bit fields.
There are no behavioral changes. This just adds definitions for the new
instructions and a couple of tests. The current implementation is just
the non-volatile form of the instructions or a C stub, but since we're
not generating them it doesn't really matter yet.
Also:
- bumped Dalvik version to 1.3.0
- added a note to the x86-atom TODO list
For bug 1633591.
|