Commit graph

88641 commits

Author SHA1 Message Date
AleX Pelosi
1cfe984af1 Merge "Revert "healthd: BatteryMonitor: doLogValues: reduce log level to debug"" into main am: 1242da780f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2965363

Change-Id: I87206087ffdcf74ae115d368c6d2450ff9d0bec2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-15 23:57:57 +00:00
AleX Pelosi
1242da780f Merge "Revert "healthd: BatteryMonitor: doLogValues: reduce log level to debug"" into main 2024-02-15 23:12:47 +00:00
AleX Pelosi
f08aeded81 Revert "healthd: BatteryMonitor: doLogValues: reduce log level to debug"
This reverts commit aeccbb8f3a.

Reason for revert: needed for debug and investigations of battery and charging issues. The tooling depends on these lines (and have been for years). You should have these lines only on SOC changes and in the presence of a serious problem. Please do not remove logging without consulting with the BMS SW team first.

Change-Id: Ife0079a7e0c1499b22e843429832b019139c0d89
2024-02-15 19:28:02 +00:00
Dennis Shen
44d2b204b0 Merge "init.rc: create /metadata/aconfig, /metadata/aconfig/flags and /metadta/aconfig/boot dirs" into main am: 48a452423b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2960463

Change-Id: Ief89fc5892275f3b52b237504aec5ab76341053e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-15 13:53:00 +00:00
Dennis Shen
48a452423b Merge "init.rc: create /metadata/aconfig, /metadata/aconfig/flags and /metadta/aconfig/boot dirs" into main 2024-02-15 13:20:02 +00:00
Akilesh Kailash
321c71426a Merge "create_snapshot: Enable v3 writer + variable block size" into main am: c65b6e62cb
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2954450

Change-Id: Icc1fd3401acdc39cf40eef759b651e56b275206b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-15 09:19:53 +00:00
Akilesh Kailash
c65b6e62cb Merge "create_snapshot: Enable v3 writer + variable block size" into main 2024-02-15 08:33:14 +00:00
Treehugger Robot
26efc75858 Merge "fastboot: Increase maximum usbfs bulk size for writes to 256KiB" into main am: c0e1b607d3
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2961895

Change-Id: Id7e7ca33204aadaba64c9bb870e3df68b33e80c4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-15 05:21:25 +00:00
Treehugger Robot
c0e1b607d3 Merge "fastboot: Increase maximum usbfs bulk size for writes to 256KiB" into main 2024-02-15 03:47:49 +00:00
Peter Collingbourne
ab8cc2f7f3 fastboot: Increase maximum usbfs bulk size for writes to 256KiB
With a device capable of saturating the bus at SuperSpeed+,
the next bottleneck is the fixed (size-independent) overhead of
the usbfs ioctl() system calls, which includes entering/exiting
the kernel, allocating/deallocating a contiguous buffer for DMA,
configuring/deconfiguring the IOMMU and issuing the DMA to the HC. In
order to saturate the bus from the host software perspective, we must
reach the schedule() call in reap_as() before the next interrupt from
the HC indicating the completion of the URB.

In my experimental setup, with an SS+ capable host and device
and 16 KiB URBs, we reach the schedule() call in 25us, but the
URB is serviced in an estimated 16us, so we lose roughly a third
of the bandwidth. Increasing the URB size to 64KiB there are
65us between interrupts and 55us until schedule(). This means
we usually reach schedule() in time but not always, so we lose a
bit of bandwidth. Increasing it again to 128KiB and we have 128us
between interrupts and 65us until schedule(), so we're now comfortably
saturating the bus. In order to account for differences between hosts,
this CL uses a doubled maximum of 256KiB.

With larger allocation sizes we now risk contiguous allocation
failures, so I implemented a fallback where we try smaller sizes if
a larger one fails.

With this CL download speeds on my hosts are now around 980 MB/s over
SS+ and 440 MB/s over SS.

Bug: 325128548
Change-Id: Ie5ad480c73f2f71a50ce7f75ffb4aaa93ded2f0b
2024-02-14 16:09:47 -08:00
Treehugger Robot
e7e3a9efb3 Merge "Check if ALWAYS_INLINE is already defined" into main am: 8097002e09
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2963982

Change-Id: I37f81d8ba382cd3cc7f57a0896b15d713895be5a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-14 21:36:53 +00:00
Treehugger Robot
8097002e09 Merge "Check if ALWAYS_INLINE is already defined" into main 2024-02-14 20:40:30 +00:00
Serdar Kocdemir
593b19b5ce Check if ALWAYS_INLINE is already defined
Fixes build errors when using callstack library in gfxstream
project, where the definition is already made.

Test: build
Change-Id: I80d4038160725b5dc70f9af93d338aca66a2f0d5
2024-02-14 17:52:19 +00:00
Florian Mayer
7dddcbbd2a Merge "Read data set by android_add_crash_detail into tombstone." into main am: 75800c9c3a
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2955722

Change-Id: I88829e46f241d0028c4a671b32af5de0f0efedba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-14 17:40:42 +00:00
Florian Mayer
75800c9c3a Merge "Read data set by android_add_crash_detail into tombstone." into main 2024-02-14 17:06:07 +00:00
Treehugger Robot
b422458e2d Merge "first_stage_console: Address compiler warning" into main am: 619042f207
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2959286

Change-Id: Id019cffe424167ff16eb939a63d8823d215e0583
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-14 16:18:47 +00:00
Treehugger Robot
619042f207 Merge "first_stage_console: Address compiler warning" into main 2024-02-14 15:34:45 +00:00
Snehal Koukuntla
880316f57d Merge "Sync tipc.h with one from trusty" into main am: 66dc1bde80
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2960970

Change-Id: Idde52332b6f82171d55ace13d94046e1d4d8e37e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-14 10:01:04 +00:00
Snehal Koukuntla
66dc1bde80 Merge "Sync tipc.h with one from trusty" into main 2024-02-14 09:07:24 +00:00
Florian Mayer
5fa6663458 Read data set by android_add_crash_detail into tombstone.
Bug: 155462331
Bug: 309446525
Change-Id: I6d01aafca48e0e5e8cbd5ae87add6aec0c429503
2024-02-13 18:13:22 -08:00
Vilas Bhat
89482bd443 Merge "ashmem: Remove hardcoded PAGE_SIZE usage in ashmem_test" into main am: 89fa277dcb
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2954211

Change-Id: I5bbb4901353724821d7a1c06bf1df37986f804b4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-14 01:11:32 +00:00
Treehugger Robot
e233ba1d0e Merge "Change debuggerd client param from pid to tid" into main am: 222ba3e8bd
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2941065

Change-Id: I1fcad6a0a9fa5299a09e8acd1dd19cab9c525ba4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-14 01:10:24 +00:00
Vilas Bhat
89fa277dcb Merge "ashmem: Remove hardcoded PAGE_SIZE usage in ashmem_test" into main 2024-02-14 00:51:11 +00:00
Treehugger Robot
222ba3e8bd Merge "Change debuggerd client param from pid to tid" into main 2024-02-14 00:13:33 +00:00
Vilas Bhat
f791b99628 ashmem: Remove hardcoded PAGE_SIZE usage in ashmem_test
Bug: 323061793
Test: atest libcutils_test
Change-Id: I8defd5225859b52a1b96a638d418188b328a23bc
2024-02-13 20:50:00 +00:00
Dennis Shen
61d9e2ab8d init.rc: create /metadata/aconfig, /metadata/aconfig/flags and
/metadta/aconfig/boot dirs

Create aconfig dirs on /metadata to store aconfig storage related files.

Under /metadata/aconfig we will store the following pb files:

1, aconfig_storage_location.pb, store the location of the storage files for
each container.

2, aconfig_flag_persistent_overrides.pb, store the local flag value overrides.

Under /metadata/aconfig/flags we will store flag value and info files
for each container, this include:

1, <container_name>.val flag value file
2, <container_name>.info flag info file

Under /metadata/aconfig/boot we will store read only flag value files
copied from /metadata/aconfig/flags at boot. These read only files are
used to serve flag read queries.

Bug: 312444587
Test: m
Change-Id: I8ae06e56fc9b9e8c0b06f86e3deb4219d7f49660
2024-02-13 20:47:13 +00:00
Snehal
f425428c2d Sync tipc.h with one from trusty
Bug: 325069766

Test: Android boot and crasher test

Change-Id: I36244cfb698a81be79c204eb019e1a59b90d2e6c
2024-02-13 18:10:00 +00:00
Pierre-Clément Tosi
914ccc5664 first_stage_console: Address compiler warning
Re-order the fields in the declaration to address the following

  ISO C++ requires field designators to be specified in declaration order;
  field 'sigaction::(anonymous union at bionic/libc/include/bits/signal_types.h:76:20)'
  will be initialized after field 'sa_flags' [-Wreorder-init-list]

Test: TH
Change-Id: I3f1d4739f1677aad50d4f07361aa264da43bdd13
2024-02-12 18:57:16 +00:00
Akilesh Kailash
e5bc36900e create_snapshot: Enable v3 writer + variable block size
1: Move to v3 COW writer

2: Enable variable block size. Default compression set to lz4
with compression factor 64KiB

3: Prepare merge sequence so that device can initiate the merge

4: Verify the merge order

Bug: 319309466

Test: On Pixel 6

This was tested on live builds where the actual builds/testing
is done on CI.

Patch-Create+Apply = Create the snapshot patches between two
builds and apply them to the device

Branch(main)            Patch-Creation+Apply  Snapshot-size
=============================================================
Build-1 -> Build-2      14 seconds            160MB

Build-2 -> Build-3      21 seconds            331MB

Build-3 -> Build-4      30 seconds            375MB

Build X -> Build X      3 seconds             8MB

Change-Id: I96437032de029d89de62ba11fe37d9287b0a4071
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-02-11 23:19:22 -08:00
Ryan Prichard
2499c6d958 Merge "libsnapshot: replace non-character basic_string[_view]<T>" into main am: 18744c17c1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2956695

Change-Id: I2f5f9e60cc8f0421e25764d7652be05e54dc2f49
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-09 20:00:33 +00:00
Ryan Prichard
18744c17c1 Merge "libsnapshot: replace non-character basic_string[_view]<T>" into main 2024-02-09 20:00:06 +00:00
Treehugger Robot
94a060ada0 Merge "Remove obsolete __STDC_LIMIT_MACROS references." into main am: 0bd010d9ae
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2955864

Change-Id: Ie8ab57eb4c3bd82a433e2bccef46e53e003a7f01
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-09 19:58:53 +00:00
Treehugger Robot
0bd010d9ae Merge "Remove obsolete __STDC_LIMIT_MACROS references." into main 2024-02-09 19:11:47 +00:00
Elliott Hughes
29cd07132d Remove obsolete __STDC_LIMIT_MACROS references.
None of our libcs need this any more.

Test: treehugger
Change-Id: I8a942ad6b3860633a6d722bd237a7c75482499eb
2024-02-09 16:40:02 +00:00
Treehugger Robot
de0c8b2425 Merge "Replace lazy_static with once_cell" into main am: 22e1c5dcb0
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2922005

Change-Id: I5b7108347a452034a3c4a4b4fb35ce7091fd508b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-09 16:29:37 +00:00
Treehugger Robot
22e1c5dcb0 Merge "Replace lazy_static with once_cell" into main 2024-02-09 15:41:46 +00:00
Ryan Prichard
abb472c238 libsnapshot: replace non-character basic_string[_view]<T>
In newer versions of libc++, std::char_traits<T> is no longer defined
for non-character types, and a result, std::basic_string<T> and
std::basic_string_view<T> are also no longer defined for non-character
types. See
https://discourse.llvm.org/t/deprecating-std-string-t-for-non-character-t/66779.

Replace them with std::vector<T> and std::span<const T>.

Bug: 175635923
Test: m MODULES-IN-system-core-fs_mgr
Test: /data/nativetest64/cow_api_test/cow_api_test
Change-Id: Ife2e87833ced43ff24e5765998cb6993e4f9b4c0
2024-02-08 23:20:10 -08:00
Treehugger Robot
6f549f998f Merge "Add test mapping" into main am: ff239bb0fc
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2955182

Change-Id: I3583320efd2158358ccfbecbc293de6a13b27870
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-08 19:06:09 +00:00
Treehugger Robot
ff239bb0fc Merge "Add test mapping" into main 2024-02-08 18:30:25 +00:00
T.J. Mercier
c902df07b0 Add test mapping
Bug: 315371696
Change-Id: If8448e703cc5accde11bcdccf7585ef6779f59b0
2024-02-08 16:57:43 +00:00
Treehugger Robot
6bbae41eae Merge "fastboot: Use clock_gettime(CLOCK_MONOTONIC) in now()" into main am: 2d686d7b71
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2955185

Change-Id: Ie3c5ca7f532f92c77ebc7df8eedf3748a3f478cf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-08 16:47:34 +00:00
Treehugger Robot
a7953f7415 Merge "Remove unused addKernelPanicSubReason() return value." into main am: 4e4d918689
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2953919

Change-Id: Idd4866e8316657b19995a138c70412e380648760
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-08 16:45:49 +00:00
Treehugger Robot
2d686d7b71 Merge "fastboot: Use clock_gettime(CLOCK_MONOTONIC) in now()" into main 2024-02-08 16:09:44 +00:00
Treehugger Robot
4e4d918689 Merge "Remove unused addKernelPanicSubReason() return value." into main 2024-02-08 16:09:04 +00:00
Neill Kapron
79fffdb0c5 Merge "healthd: BatteryMonitor: doLogValues: reduce log level to debug" into main am: 2b2fcaea46
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2953924

Change-Id: I74fc84205ec64a9e037397ee0f3093b3d48b5142
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-08 03:43:53 +00:00
Treehugger Robot
bb2fc5a0b5 Merge "fastboot: Remove '\n' from interface name on linux" into main am: 241046adaa
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2955272

Change-Id: I772dfb2fbfadfe48b76f05951e03e648ab2a71fb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-08 03:43:30 +00:00
Neill Kapron
2b2fcaea46 Merge "healthd: BatteryMonitor: doLogValues: reduce log level to debug" into main 2024-02-08 03:24:16 +00:00
Treehugger Robot
241046adaa Merge "fastboot: Remove '\n' from interface name on linux" into main 2024-02-08 03:11:53 +00:00
Peter Collingbourne
cc1bf34ba6 fastboot: Use clock_gettime(CLOCK_MONOTONIC) in now()
If the system time changes during the execution of fastboot we might
see some strange output such as:

Sending sparse 'super' 4/20 (254972 KB)            OKAY [-516.263s]

Fix it by changing now() to use clock_gettime(CLOCK_MONOTONIC).
I confirmed that all callers of now() are using it for relative time
and not time since the epoch.

Change-Id: Ic3e9442c2ab21dfb076bfed88915085a183754b0
2024-02-07 16:55:49 -08:00
Matt Schulte
28f4807dd3 fastboot: Remove '\n' from interface name on linux
If the device provides an interface string, we should remove the newline
from the read file that is added from by the linux kernel.

Bug: 324320178
Test: Ran the same command with my local changes vs not

```
bash$ ./fastboot devices -l
5f42ad5ad259c90cf14ea222791b6aaa fastboot usb:7-3

bash$ fastboot devices -l
5f42ad5ad259c90cf14ea222791b6aaa fastboot
 usb:7-3
```

Change-Id: Ida3316fdba8e35f0c66784f83455a4d82e90ba1c
2024-02-07 16:24:26 -08:00