On Android the ashmem API is used to deal with shared memory. This API doesn't
provide any way to open a memory region created by another process for security
reasons. The only way to share memory on Android is to share the underlying
file descriptor between processes.
This can be accomplished by:
- Creating a new shared memory region in a process. Note that this region can
be anonymous (i.e. the string provided to ashmem_create_region() can be
empty).
- Forking and keeping open both in the parent and child processes the file
descriptor corresponding to the previously created memory region.
- Doing an mmap() in both processes (nothing special here).
The unit test was deadlocking (stuck in the while loop in the child process)
since the call to CreateNamed() wasn't opening the existing shared memory
region (created by the parent process) but was actually creating a new shared
memory region.
This means that the two processes were actually seeing different memory
regions.
Since this also works on POSIX platforms, the unit test was modified to follow
this strategy on all POSIX systems (including Android). On Windows the old
strategy (using non-anonymous shared memory) is still used.
BUG=136720
Review URL: https://chromiumcodereview.appspot.com/11299159
git-svn-id: http://src.chromium.org/svn/trunk/src/build@169662 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This appears to break Chrome for Android perf tests, in addition to
the kraken benchmark upstream.
-------------------
Log output:
Traceback (most recent call last):
File "clank/build/run_crossbrowser_perftests.py", line 1429, in <module>
sys.exit(main(sys.argv))
File "clank/build/run_crossbrowser_perftests.py", line 1416, in main
passed &= chrome_benchmarks.Run()
File "/usr/local/google/b/build/slave/soju-official-perf-noflash-clankium/build/src/clank/build/../../build/android/pylib/base_test_runner.py", line 79, in Run
return self.RunTests()
File "clank/build/run_crossbrowser_perftests.py", line 329, in RunTests
return self.RunCrossBrowserPerfTests(options.filter, options.force_disabled)
File "clank/build/run_crossbrowser_perftests.py", line 379, in RunCrossBrowserPerfTests
passed &= bool(RunTheTest())
File "clank/build/run_crossbrowser_perftests.py", line 368, in RunTheTest
return test_fn()
File "clank/build/run_crossbrowser_perftests.py", line 1222, in PaintBlankBenchmark
timeout)
File "clank/build/run_crossbrowser_perftests.py", line 426, in RunPaintBenchmarkHelper
timeout=timeout))
File "/usr/local/google/b/build/slave/soju-official-perf-noflash-clankium/build/src/clank/build/perf_test_runner.py", line 629, in RunPerfTest
result, units, result_type=result_type)
File "/usr/local/google/b/build/slave/soju-official-perf-noflash-clankium/build/src/clank/build/../../build/android/pylib/perf_tests_helper.py", line 127, in PrintPerfResult
output += '\nAvg %s: %f%s' % (measurement, avg, units)
TypeError: float argument required, not str
-------------------
Original commit:
The previous version was printing out only the first histogram.
BUG=
Review URL: https://codereview.chromium.org/11413144TBR=marja@chromium.org
Review URL: https://codereview.chromium.org/11418165
git-svn-id: http://src.chromium.org/svn/trunk/src/build@169510 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This lets device_forwarder be controlled (started and killed) like
host_forwarder (see r167167).
This has the main benefit of moving the setup/tear down complexity from the
Python Forwarder wrapper code to the forwarder itself so that various clients
(including WebKit) can use forwarder2 more easily (e.g. no need to use pexpect
anymore (which is not available in WebKit)).
This implied a refactoring in the Daemon class so that its clients don't have
to duplicate the socket-related code.
Review URL: https://chromiumcodereview.appspot.com/11360248
git-svn-id: http://src.chromium.org/svn/trunk/src/build@169334 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This is used for normal builds to strip out lots of unneeded symbols and
minimize binary size. However, for shared library build, this causes
needed symbols to be excluded and subsequent so's to fail linking.
BUG=158821
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11413110
git-svn-id: http://src.chromium.org/svn/trunk/src/build@169060 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
The WebView build doesn't have third_party/android_tools/ndk with the
added gyp file, but the cpufeatures code has already been built as part
of the system. Introduce a .gypi that can be included to get the
appropriate dependency for the current build type.
BUG=
Review URL: https://codereview.chromium.org/11417114
git-svn-id: http://src.chromium.org/svn/trunk/src/build@169026 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
The genproto_java action was not necessarily run before the java.gypi
included action, so the build would fail.
This makes java.gypi depend on the genproto_java stamp file, so the
order will now be deterministic.
BUG=161587
Review URL: https://codereview.chromium.org/11413091
git-svn-id: http://src.chromium.org/svn/trunk/src/build@168838 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
The NoCache test for the PAC fetcher verifies that an attempt to
fetch a PAC script fails once the server is killed, thus assuring
that PAC files are not cached.
Due to the device-server / port forwarding layout of running
gtests on Android, the specific error being returned by the
fetch attempt is "Connection reset by peer" rather than
"Connection refused". This patch takes this into consideration.
BUG=161763
Review URL: https://chromiumcodereview.appspot.com/11412070
git-svn-id: http://src.chromium.org/svn/trunk/src/build@168805 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This adds Java resources directly to the content and chrome folders and starts
accessing them through the Java classes org.chromium.content.R and
org.chromium.chrome.R instead of using AppResource.
A following CL will remove these resources from ContentShell and other build
targets that currently provide duplicates of these resources. The following CL
will also remove remaining references to AppResource.
This is the second of three CLs to replace AppResource with R:
1. http://codereview.chromium.org/11363150 - Support Java resources within content
2. http://codereview.chromium.org/11360207 - Add Java resources to content and chrome
3. http://codereview.chromium.org/11377117 - Remove AppResource and unneeded resources
BUG=136704
Review URL: https://chromiumcodereview.appspot.com/11360207
git-svn-id: http://src.chromium.org/svn/trunk/src/build@168759 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
In Android 4.2, pinch gestures send both pinch events (for the
zoom-in/out part of the pinch) and scroll events (for double-finger
panning). The previous logic in LayerTreeHostImpl created a pan from
the pinch event, resulting in 2x overpanning on Android 4.2.
In order to have compatible gesture generation in older Android versions as
well, I copy-pasted the latest Android GestureDetector.java file into the
Chromium tree and use that instead of the system file.
BUG=161909
Review URL: https://chromiumcodereview.appspot.com/11299083
git-svn-id: http://src.chromium.org/svn/trunk/src/build@168721 4ff67af0-8c30-449e-8e8b-ad334ec8d88c