Commit graph

27184 commits

Author SHA1 Message Date
Mark Salyzyn
bbb4fa78a6 Merge "Revert "Check against LOG_ID_MAX instead of LOG_ID_KERNEL""
am: 2bc8e32242

Change-Id: Ide666aec2b5822828b1c86b9430c6d6fbee303ff
2017-02-14 23:16:36 +00:00
Treehugger Robot
2bc8e32242 Merge "Revert "Check against LOG_ID_MAX instead of LOG_ID_KERNEL"" 2017-02-14 23:08:16 +00:00
Jerry Zhang
14e71a4af2 Merge changes from topic 'adb_perf'
am: 42aa9a1415

Change-Id: I56b73a99b05634164379c700be9bdbd0a98c39c3
2017-02-14 21:51:34 +00:00
Jerry Zhang
42aa9a1415 Merge changes from topic 'adb_perf'
* changes:
  adb: Add bMaxBurst to superspeed descriptors
  adb: Set max socket sizes to larger values.
  adb: Pre allocate kernel memory
2017-02-14 21:46:27 +00:00
Mark Salyzyn
f8fc6f1870 Revert "Check against LOG_ID_MAX instead of LOG_ID_KERNEL"
causes a regression, logcat -b kernel does not work.

Check should have landed in logd_writer.c

This reverts commit 2c2337a293.

Change-Id: I1004b44ecc87f5d83d1c4463dd8b1ac16499706d
2017-02-14 21:00:57 +00:00
Sandeep Patil
c027aac7c8 Merge changes from topic 'pre-early-mount'
am: 1549257ff5

Change-Id: I17bf2a322c0230f7cb368edd337e945742a10585
2017-02-14 20:37:01 +00:00
Treehugger Robot
1549257ff5 Merge changes from topic 'pre-early-mount'
* changes:
  init: fstab: add support to read fstab entries from device tree
  init: early_mount: add support to mount non-verity partitions early
  init: remove the existing early_mount code
  init: refactor: add support for doing early coldboot
  ueventd: make selinux labeling optional for device creation
2017-02-14 20:34:35 +00:00
James Hawkins
a967cf817a Merge "Revert "bootstat: Refactor init/utils/boot_clock into base/chrono_utils.""
am: 91cf0bd5c0

Change-Id: Id003d25146804cc1def16c7d95e76a2c36cd8fad
2017-02-14 19:31:19 +00:00
James Hawkins
91cf0bd5c0 Merge "Revert "bootstat: Refactor init/utils/boot_clock into base/chrono_utils."" 2017-02-14 19:24:36 +00:00
James Hawkins
c8ac067773 Revert "bootstat: Refactor init/utils/boot_clock into base/chrono_utils."
This reverts commit 7c92e48450.

Mac sdk still broken (despite testing locally).

Change-Id: I7d9206e15997cd0efe081bd3fa17d53d2b20ec32
2017-02-14 19:20:20 +00:00
Elliott Hughes
09980cd1a8 Merge "Fix ubsan failure in android::base::Split."
am: aa9548dbb4

Change-Id: Iaa8593f981db12b65a6eb13fddf5e894f58ca7a7
2017-02-14 19:04:38 +00:00
James Hawkins
07af328555 Merge "bootstat: Refactor init/utils/boot_clock into base/chrono_utils."
am: e968b73e19

Change-Id: Ie060ef465e79724bc9920ad14f6e59a5c4f719cd
2017-02-14 19:04:24 +00:00
Treehugger Robot
aa9548dbb4 Merge "Fix ubsan failure in android::base::Split." 2017-02-14 18:43:17 +00:00
Treehugger Robot
e968b73e19 Merge "bootstat: Refactor init/utils/boot_clock into base/chrono_utils." 2017-02-14 18:35:54 +00:00
Narayan Kamath
9babb434ed Merge "Reapply 1339871138: Only apply schedTune boost to top-app tasks"
am: dce4b65fe0

Change-Id: I6a9191ee077bde1a6c0140400079df1d9954af84
2017-02-14 09:08:41 +00:00
Narayan Kamath
dce4b65fe0 Merge "Reapply 1339871138: Only apply schedTune boost to top-app tasks" 2017-02-14 09:05:29 +00:00
Elliott Hughes
d96f68ee21 Merge "Implement android::base::WaitForProperty."
am: 01003d40fc

Change-Id: Iede377bab376afff8146ca6fdf9c88d326cf0487
2017-02-14 03:52:30 +00:00
Treehugger Robot
01003d40fc Merge "Implement android::base::WaitForProperty." 2017-02-14 03:48:26 +00:00
Steven Moreland
c405ad5c43 Merge "fs_config: wifi is now on vendor partition"
am: 11d3d4d22a

Change-Id: Iaaff4b41d7ac72f68717d5ee5f6bf15861439d0a
2017-02-14 03:07:48 +00:00
Treehugger Robot
11d3d4d22a Merge "fs_config: wifi is now on vendor partition" 2017-02-14 03:05:03 +00:00
Josh Gao
6579e50ee5 Merge "debuggerd_handler: don't use waitpid(..., __WCLONE)."
am: c2467e03ce

Change-Id: I8a59760ea238b6c9eca29f0ffa7369ae51a7284b
2017-02-14 03:03:47 +00:00
Josh Gao
c2467e03ce Merge "debuggerd_handler: don't use waitpid(..., __WCLONE)." 2017-02-14 03:00:37 +00:00
Jerry Zhang
b5a34a2bce adb: Add bMaxBurst to superspeed descriptors
This gives a large boost to speed on usb 3.0.

Test: adb pull/push multi GB files
Bug: 31722483
Change-Id: Iea039f1aba8b2e4d7e4a2ecb504cccb5dd1e4629
2017-02-13 18:19:41 -08:00
Jerry Zhang
2f8c60b1cc adb: Set max socket sizes to larger values.
This improves performance of push/pull.

Test: adb push/pull multi GB files.
Bug: 31722483
Change-Id: Ia01574c3db6a740d7a7e64ba1f5bc1fc279fb3f6
2017-02-13 18:19:36 -08:00
James Hawkins
1715ee2854 Merge "libmetricslogger: Use libBionicGtestMain instead of a custom test runner."
am: 07e57b4b25

Change-Id: I381e97ba2555df545fb63e7fe062da6783ef8687
2017-02-14 02:12:31 +00:00
Treehugger Robot
07e57b4b25 Merge "libmetricslogger: Use libBionicGtestMain instead of a custom test runner." 2017-02-14 02:07:30 +00:00
Steven Moreland
b7ca92349e fs_config: wifi is now on vendor partition
Bug: 34135607
Test: pass
Change-Id: I0c9dd9642e780a0303e6aaa6d80e443c59cc0c28
2017-02-13 17:21:17 -08:00
Josh Gao
c3c8c029ec debuggerd_handler: don't use waitpid(..., __WCLONE).
waitpid(..., __WCLONE) fails with ECHILD when passed an explicit PID to
wait for. __WALL and __WCLONE don't seem to be necessary when waiting
for a specific pid, so just pass 0 in the flags instead.

Bug: http://b/35327712
Test: /data/nativetest/debuggerd_test/debuggerd_test32 --gtest_filter="*zombie*"
Change-Id: I3dd7a1bdf7ff35fdfbf631429c089ef4e3172855
2017-02-13 17:01:24 -08:00
Yabin Cui
8a5f594bc3 Merge "libbase: fix the way to find temp dir."
am: b13d4a31a3

Change-Id: I8e3690c1e4b9cb4ce67e1bba323b21c3f9f7bcd9
2017-02-14 00:35:44 +00:00
Yabin Cui
b13d4a31a3 Merge "libbase: fix the way to find temp dir." 2017-02-14 00:29:40 +00:00
Yabin Cui
57e9cea099 libbase: fix the way to find temp dir.
Tests running in app context can't access /data/local/tmp,
so try current directory if /data/local/tmp is not accessible.

Bug: http://b/18790309
Test: run unit test in app context and shell context.
Change-Id: If66fe8f0ac3edb3a32a2a2a50a524364f818a58b
2017-02-13 15:50:56 -08:00
James Hawkins
7c92e48450 bootstat: Refactor init/utils/boot_clock into base/chrono_utils.
Use this for bootstat and init. This replaces the custom uptime parser in
bootstat.

This is a reland of aosp/332854 with a fix for Darwin.

Bug: 34352037
Test: chrono_utils_test
Change-Id: Ib2567d8df0e460ab59753ac1c053dd7f9f1008a7
2017-02-13 15:47:21 -08:00
Jerry Zhang
55205a565b adb: Pre allocate kernel memory
This allows reliable use of larger buffer sizes.
Max r/w size is set only when that preallocation
is successful so that memory is guaranteed to be
available.

Bug: 31722483
Test: adb push with multi GB files
Change-Id: Ia0459ca051988abb144645871792e8f840dd3ff7
2017-02-13 14:20:47 -08:00
Elliott Hughes
bf0dd7cb03 Fix ubsan failure in android::base::Split.
ubsan doesn't like us incrementing std::string::npos, even if we won't use
the result.

Bug: http://b/28729303
Test: ran tests
Change-Id: I8227eca57dc6f3e49626c7025514caa04ef18f0a
2017-02-13 14:13:24 -08:00
James Hawkins
7607adfd53 libmetricslogger: Use libBionicGtestMain instead of a custom test runner.
Also remove commented out code I accidentally left in.

Bug: 34456830
Test: libmetricslogger_test
Change-Id: If76d3013ec7eaa71cef67c6db04d810745e3833e
2017-02-13 13:41:44 -08:00
Yabin Cui
47ac9e420f Merge "libbacktraceoffline: make it thread-safe."
am: a3e4977325

Change-Id: I90fab011054ffd9e3aa934cac551f3e0f9144ed0
2017-02-13 21:34:18 +00:00
Treehugger Robot
a3e4977325 Merge "libbacktraceoffline: make it thread-safe." 2017-02-13 21:28:15 +00:00
Sandeep Patil
fc86f2442f init: fstab: add support to read fstab entries from device tree
for early mount, we need a way to tell init where to find vendor,
odm partitions (also system in case of non-A/B devices). Also, that
needs to be independent of kernel cmdline since the cmdline will likely
exceed its limit.

The change adds support for parse and create fstab entries that can be
directly sent to the fs_mgr for mounting partitions early in init first
stage.

Sample DT entry to mount vendor partition early on angler-

firmware {
    android {
        compatible = "android,firmware";
        fstab {
            compatible = "android,fstab";
            vendor {
                compatible = "android,vendor";
                dev = "/dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor";
                type = "ext4";
                mnt_flags = "ro,barrier=1,inode_readahead_blks=8";
                fsmgr_flags = "wait";
            };
        };
    };
};

b/27805372

Test: Boot angler and sailfish with early "vendor" partition mount by
adding aforementioned DT node and enable CONFIG_PROC_DEVICETREE in kernel

Change-Id: I669013e3fdb157e88719436534f63989dec95d60
Signed-off-by: Sandeep Patil <sspatil@google.com>
2017-02-13 12:35:39 -08:00
Elliott Hughes
b30769a87a Implement android::base::WaitForProperty.
Also adapt libcutils to the bionic change that was necessary for this.

Bug: http://b/35201172
Test: ran tests
Change-Id: I72a98b70b03d23e958b46778b505fbd5c86c32ae
2017-02-13 11:29:02 -08:00
Dimitry Ivanov
70cfd3ae79 Merge "Add comment to android_link_namespaces method"
am: 7e7913cb67

Change-Id: Iaa7062ebf722dc614552849579bcc80cb059d276
2017-02-13 19:28:52 +00:00
Treehugger Robot
7e7913cb67 Merge "Add comment to android_link_namespaces method" 2017-02-13 19:23:49 +00:00
Sandeep Patil
35403ebaf8 init: early_mount: add support to mount non-verity partitions early
This is done by parsing 'androidboot.fstab=<fstab>' kernel cmdline
option to get the fstab file that *only* specifies partitions to be
mounted early (i.e. in init's first stage).

Note that, the same fstab file may not be used as an argument to
mount_all later in the boot as that will cause fs_mgr to fail with
EBUSY.

TODO:
- Possibly add a new mount_mode so the same fstab can be used for
early_mount, 'mount_all --early/--late' etc.
- Add support for dm-verity enabled partitions to mount early.
- Add support for getting fstab arguments through DT instead of kernel
cmdline.

Bug: 27805372

Test:
Boot angler by passing a seperate fstab file using the kernel
cmdline option to mount vendor partition early, remove the vendor
partition entry from the main fstab file for the test.

Boot sailfish by passing a seperate fstab entry via device tree
to mount vendor partition early. Remove vendor partition entry from
the main fstab file for the test

Change-Id: I18785b893c54c8cee960ab44d5e8f83e5d624aa8
Signed-off-by: Sandeep Patil <sspatil@google.com>
2017-02-13 11:17:51 -08:00
James Hawkins
348a393df4 Merge "libmetricslogger: Refactor Tron metrics histogram logging out of bootstat."
am: 64984aaa6e

Change-Id: I6628c5ea371c34dcc1b0e8ff0a74758479dd7c58
2017-02-13 18:42:30 +00:00
Yabin Cui
c458193f7f Merge "libbacktraceoffline: choose correct debug section for a given address."
am: 5c3a707542

Change-Id: If3188979346e26522707ac6aefa91a30a0300f13
2017-02-13 18:42:18 +00:00
James Hawkins
64984aaa6e Merge "libmetricslogger: Refactor Tron metrics histogram logging out of bootstat." 2017-02-13 18:41:23 +00:00
Yabin Cui
26369a3a01 libbacktraceoffline: make it thread-safe.
Make libbacktraceoffline thread-safe by protecting the global variable with
a lock. So it can be used in a multi-thread environment, like by
simpleperf inplace sampling.

Bug: http://b/30974760
Test: no
Change-Id: I4699bf15dfa69ac75faeb4e79a73fb3af0f08dfc
2017-02-13 10:35:06 -08:00
Yabin Cui
5c3a707542 Merge "libbacktraceoffline: choose correct debug section for a given address." 2017-02-13 18:33:50 +00:00
Narayan Kamath
eeabbeba16 Reapply 1339871138: Only apply schedTune boost to top-app tasks
Parts of this change were accidentally reverted by an incorrect
manual merge conflict resolution.

Bug: 35306127
Test: manual
Change-Id: I8e6d6b07dcaa548775213dd42ba9def7431c62d3
2017-02-13 17:34:51 +00:00
Dimitry Ivanov
3f5b5dc546 Add comment to android_link_namespaces method
Test: n/a - comment only change
Bug: http://b/26833548
Change-Id: I40356eec37aeb864206982feb877c59c21c9a433
2017-02-13 08:52:35 -08:00
Dimitry Ivanov
e6050e248a Merge "Replace public library list with shared lib sonames"
am: fd87c062ab

Change-Id: I6c3578920711e16f28a04305bc12c02db905bf3e
2017-02-11 19:30:02 +00:00