OSDN Git Service

android-x86/system-extras.git
4 years agosimpleperf: fix build id in pprof_proto_generator.py.
Yabin Cui [Tue, 17 Sep 2019 19:25:43 +0000 (12:25 -0700)]
simpleperf: fix build id in pprof_proto_generator.py.

Simpleperf stores padded build id in perf.data, but pprof needs
real build ids in proto file. So we need to convert from padded
build ids to real build ids.

Bug: 141026312
Test: run test.py.
Change-Id: I7f4454343fd80f77364b67ec729cfba478925029

4 years agoMerge "Add a per-boot-key policy reference"
Paul Crowley [Tue, 17 Sep 2019 05:40:05 +0000 (05:40 +0000)]
Merge "Add a per-boot-key policy reference"

4 years agoAdd a per-boot-key policy reference
Paul Crowley [Wed, 11 Sep 2019 21:57:45 +0000 (14:57 -0700)]
Add a per-boot-key policy reference

Bug: 140882488
Test: Booted twice, checked logs to ensure encryption
    is different each time, adb created files in directory.
Change-Id: I5c962edb316d160dd09c0df893912c6b257d7810

4 years agoMerge "lpdump: Fix slot handling on retrofit devices."
David Anderson [Thu, 12 Sep 2019 20:54:34 +0000 (20:54 +0000)]
Merge "lpdump: Fix slot handling on retrofit devices."

4 years agoMerge "verity: Do not increment data when it is nullptr."
Tianjie Xu [Wed, 11 Sep 2019 19:11:34 +0000 (19:11 +0000)]
Merge "verity: Do not increment data when it is nullptr."

4 years agoMerge changes from topic "protobuf-3.9.1"
Colin Cross [Wed, 11 Sep 2019 18:00:16 +0000 (18:00 +0000)]
Merge changes from topic "protobuf-3.9.1"

* changes:
  libjsonpb: fix tests for new protobuf version
  Adapt to google::protobuf::int64 type change and scoped_ptr removal

4 years agoMerge "Create per-uid GCOV_PREFIX dir in the getenv wrapper"
Treehugger Robot [Wed, 11 Sep 2019 03:54:13 +0000 (03:54 +0000)]
Merge "Create per-uid GCOV_PREFIX dir in the getenv wrapper"

4 years agoCreate per-uid GCOV_PREFIX dir in the getenv wrapper
Pirama Arumuga Nainar [Fri, 26 Jul 2019 21:49:58 +0000 (14:49 -0700)]
Create per-uid GCOV_PREFIX dir in the getenv wrapper

Bug: http://b/116873221

With https://reviews.llvm.org/D65245, the profile runtime assumes that
the directory ${GCOV_PREFIX} is already created.  Before returning from
the getenv wrapper, create the per-uid ${GCOV_PREFIX}.

Test: cuttlefish builds and boots with new Clang.
Change-Id: I276e1a92b3cb18ee85bb4451159b131d8ebca4a2

4 years agoMerge changes from topics "lpdump-all", "lpdump-bugreport"
David Anderson [Tue, 10 Sep 2019 21:36:39 +0000 (21:36 +0000)]
Merge changes from topics "lpdump-all", "lpdump-bugreport"

* changes:
  lpdump: Add an --all command to dump all metadata slots.
  lpdump: Refactor how lpdump reads metadata.

4 years agolpdump: Fix slot handling on retrofit devices.
David Anderson [Fri, 6 Sep 2019 01:53:21 +0000 (18:53 -0700)]
lpdump: Fix slot handling on retrofit devices.

On retrofit devices, use the correct super partition when none is
explicitly specified.

Bug: 140204341
Test: manual test
Change-Id: I2753024bd2e7dfdf9d19916f30c1b2bd6b5ee289

4 years agolpdump: Add an --all command to dump all metadata slots.
David Anderson [Fri, 6 Sep 2019 01:31:12 +0000 (18:31 -0700)]
lpdump: Add an --all command to dump all metadata slots.

Note that this will not correctly dump all slots on retrofit devices.

Bug: 140204341
Test: lpdump --all
Change-Id: Icb8d8619202221f0c5fc8848abc7172d0b4dafd3

4 years agoverity: Do not increment data when it is nullptr.
MarijnS95 [Mon, 9 Sep 2019 13:50:43 +0000 (15:50 +0200)]
verity: Do not increment data when it is nullptr.

Address a segfault introduced in
d6dc877032c65768b3c6737156d3142f32cc9984

As soon as leftover_ becomes non-empty, the data pointer is incremented
and will now be an invalid pointer in case it was null previously.
The subsequent check in HashBlocks() will now encounter a non-null data
ptr and pass it to HashBlock(), triggering a segfault.

Test: Manually build and boot an image on which this crashed before.
Test: build_verity_tree_test
Change-Id: I324ff6103c9d35fb290c4e96fb5009ee365a0249
Signed-off-by: MarijnS95 <marijns95@gmail.com>
(cherry picked from commit c82514bd034f214b16d273b10c676dd63a9e603b)

4 years agoMerge "Remove libhwbinder/libhidltransport deps"
Steven Moreland [Fri, 6 Sep 2019 19:33:29 +0000 (19:33 +0000)]
Merge "Remove libhwbinder/libhidltransport deps"

4 years agolpdump: Refactor how lpdump reads metadata.
David Anderson [Fri, 6 Sep 2019 00:57:20 +0000 (17:57 -0700)]
lpdump: Refactor how lpdump reads metadata.

This patch prepares lpdump for the addition of an "--all" option to dump
all metadata slots.

 - The slot and super partition name are now determined ahead of time,
   rather than as part of reading metadata.
 - The custom IPartitionOpener has been removed as it served no purpose.
 - The -e option has been removed in favor of IsEmptySuperImage().
 - Metadata spew has been factored into a separate function.

Bug: 140204341
Test: manual test
Change-Id: I810a5f042870f7e072a8939bebe99b8707235f43

4 years agoMerge changes I51ee7070,I499a70a9
Eric Biggers [Thu, 5 Sep 2019 22:51:17 +0000 (22:51 +0000)]
Merge changes I51ee7070,I499a70a9

* changes:
  libfscrypt: simplify fscrypt_policy_ensure()
  libfscrypt: remove some hardcoded definitions

4 years agolibjsonpb: fix tests for new protobuf version
Yifan Hong [Tue, 27 Aug 2019 20:51:42 +0000 (13:51 -0700)]
libjsonpb: fix tests for new protobuf version

Bug: 117607748
Test: atest --host libjsonpbverify_test
Change-Id: I5ce89c330d769fac10d8092734a37c26694587a2
Merged-In: I5ce89c330d769fac10d8092734a37c26694587a2

4 years agoAdapt to google::protobuf::int64 type change and scoped_ptr removal
Colin Cross [Wed, 14 Aug 2019 00:03:15 +0000 (17:03 -0700)]
Adapt to google::protobuf::int64 type change and scoped_ptr removal

Protobuf 3.9.1 redefines google::protobuf::int64 from long long to
int64_t, which is sometimes long and sometimes long long.  Use
PRId64 to print it.

scoped_ptr has been removed, use std::unique_ptr instead.

Bug: 117607748
Test: m checkbuild
Change-Id: Idfcaba262c27cf2b895a0a6ded8394c8465547e8
Merged-In: Idfcaba262c27cf2b895a0a6ded8394c8465547e8

4 years agoRemove libhwbinder/libhidltransport deps
Steven Moreland [Thu, 5 Sep 2019 21:17:28 +0000 (14:17 -0700)]
Remove libhwbinder/libhidltransport deps

Since these were combined into libhidlbase.

Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: Iea42841e537a16a302b6d425faf2c6bd511c6bad

4 years agolibfscrypt: simplify fscrypt_policy_ensure()
Eric Biggers [Thu, 5 Sep 2019 19:18:30 +0000 (12:18 -0700)]
libfscrypt: simplify fscrypt_policy_ensure()

fscrypt_policy_ensure() sets an encryption policy if the directory is
empty, otherwise it verifies the existing encryption policy.

However, it's unnecessary to actually implement this logic in userspace,
because this is the behavior of the FS_IOC_SET_ENCRYPTION_POLICY ioctl
already.  See the documentation:
https://www.kernel.org/doc/html/latest/filesystems/fscrypt.html#setting-an-encryption-policy

Therefore, just call FS_IOC_SET_ENCRYPTION_POLICY and handle errors
appropriately.

This makes the code shorter and less racy, and it also fixes the issue
where if files were created in the directory before an encryption policy
is set, the error message was confusing:

    Failed to get encryption policy for $dir: No data available

Now it's:

    Failed to set encryption policy of $dir to ...: Directory not empty

Test: booted after factory reset, checked log, rebooted, checked log
      again.
Change-Id: I51ee70706bc9ccb216ccefd7bdfbbfc57faae14d

4 years agolibfscrypt: remove some hardcoded definitions
Eric Biggers [Thu, 5 Sep 2019 19:18:29 +0000 (12:18 -0700)]
libfscrypt: remove some hardcoded definitions

FS_ENCRYPTION_MODE_ADIANTUM and FS_POLICY_FLAG_DIRECT_KEY are in
Bionic's <linux/fs.h> now, so there's no need to define them in
libfscrypt anymore.

Test: compiled
Change-Id: I499a70a9f8fd3445098a1dd799b1aefe0fa374ce

4 years agoMerge "DO NOT MERGE - Merge Android 10 into master"
Xin Li [Thu, 5 Sep 2019 16:53:33 +0000 (16:53 +0000)]
Merge "DO NOT MERGE - Merge Android 10 into master"

4 years agoMerge "simpleperf: support profiling art interpreter on linux host."
Treehugger Robot [Thu, 5 Sep 2019 16:45:38 +0000 (16:45 +0000)]
Merge "simpleperf: support profiling art interpreter on linux host."

4 years agosimpleperf: support profiling art interpreter on linux host.
Yabin Cui [Wed, 4 Sep 2019 22:49:19 +0000 (15:49 -0700)]
simpleperf: support profiling art interpreter on linux host.

Bug: 140300587
Test: run simpleperf_unit_test.
Test: run simpleperf on host.
Change-Id: Ia2e21cabf2661c82bb611c525d5277b1e4d13a23

4 years agoDO NOT MERGE - Merge Android 10 into master
Xin Li [Wed, 4 Sep 2019 20:35:27 +0000 (13:35 -0700)]
DO NOT MERGE - Merge Android 10 into master

Bug: 139893257
Change-Id: I35ce2edc54690d76c26efed846e232ff223ebb4e

4 years agoMerge "Add support for new taskstats v9 functionality"
Peter Enderborg [Tue, 3 Sep 2019 20:56:38 +0000 (13:56 -0700)]
Merge "Add support for new taskstats v9 functionality"
am: 9229017530

Change-Id: Ifc4601aa55c3475e726470189c3b56613fdc47c8

4 years agoMerge "Add support for new taskstats v9 functionality"
Treehugger Robot [Tue, 3 Sep 2019 20:37:06 +0000 (20:37 +0000)]
Merge "Add support for new taskstats v9 functionality"

4 years agoMerge "simpleperf: switch to llvm-symbolizer."
Yabin Cui [Tue, 3 Sep 2019 17:41:15 +0000 (10:41 -0700)]
Merge "simpleperf: switch to llvm-symbolizer."
am: f626973b9a

Change-Id: Iba347945d89f95967815e58809b90d667e0df8d5

4 years agoMerge "simpleperf: switch to llvm-symbolizer."
Yabin Cui [Tue, 3 Sep 2019 17:21:54 +0000 (17:21 +0000)]
Merge "simpleperf: switch to llvm-symbolizer."

4 years agosimpleperf: switch to llvm-symbolizer.
Yabin Cui [Fri, 30 Aug 2019 22:51:33 +0000 (15:51 -0700)]
simpleperf: switch to llvm-symbolizer.

Bug: 74395415
Test: run test.py.
Change-Id: I4cc0013735bedcfd18813428e4892049277c38ff

4 years agoMerge "Refactor code with single trace parser."
Christopher Ferris [Fri, 30 Aug 2019 18:17:55 +0000 (11:17 -0700)]
Merge "Refactor code with single trace parser."
am: 7ac993ce67

Change-Id: Iff4618349bce7e22456bf004b861daafcc0328f6

4 years agoMerge "Refactor code with single trace parser."
Christopher Ferris [Fri, 30 Aug 2019 17:47:00 +0000 (17:47 +0000)]
Merge "Refactor code with single trace parser."

4 years agoRefactor code with single trace parser.
Christopher Ferris [Tue, 27 Aug 2019 00:51:19 +0000 (17:51 -0700)]
Refactor code with single trace parser.

This is the first step towards adding a new way to benchmark the
traces. This new way would be a way to add all threads running at once.

Also to try and make it possible to do the faster runs that jmgao had
done a while ago.

Modified the code so that it's possible for memory_replay to play
the zip file, no need to unzip the trace files.

Add a single parser for the trace files.

Remove as many possible allocation points in the system. This allows
the traces to be run as pure as possible.

Added new unit tests to cover new code.

Bug: 137795072

Test: All unit tests pass.
Test: Ran select traces using the old version and the new version.
Test: Both get nearlyt he same RSS, but slightly different VA space
Test: due to the new version avoiding allocations at all costs.
Test: Ran the trace benchmarks and verified that the old version and the
Test: new version produce nearly the same numbers.
Change-Id: I8e8a28436f23b09eba57772c62bb0b866d874437

4 years agoMerge "simpleperf: add --include-filter in record cmd."
Yabin Cui [Thu, 29 Aug 2019 23:47:02 +0000 (16:47 -0700)]
Merge "simpleperf: add --include-filter in record cmd."
am: 178d1d48bf

Change-Id: Ib04498c4d08229a815bb24d65048fde1f6d97b42

4 years agoMerge "simpleperf: add --include-filter in record cmd."
Yabin Cui [Thu, 29 Aug 2019 23:37:14 +0000 (23:37 +0000)]
Merge "simpleperf: add --include-filter in record cmd."

4 years agosimpleperf: add --include-filter in record cmd.
Yabin Cui [Tue, 6 Aug 2019 17:29:45 +0000 (10:29 -0700)]
simpleperf: add --include-filter in record cmd.

It is to only record selected binaries in cs-etm tracing.

Bug: 135204414
Test: run simpleperf_unit_test.

Change-Id: I5dae729aee1642d9384ee9bb88ee8cb25950131a

4 years agoMerge "Update lpdump to recognize LP_PARTITION_ATTR_UPDATED."
David Anderson [Wed, 28 Aug 2019 03:00:49 +0000 (20:00 -0700)]
Merge "Update lpdump to recognize LP_PARTITION_ATTR_UPDATED."
am: 3562ed57ed

Change-Id: I193a78d01e2066a2f07b8d83906cd0a839957a8c

4 years agoMerge "Update lpdump to recognize LP_PARTITION_ATTR_UPDATED."
David Anderson [Wed, 28 Aug 2019 02:51:43 +0000 (02:51 +0000)]
Merge "Update lpdump to recognize LP_PARTITION_ATTR_UPDATED."

4 years agoUpdate lpdump to recognize LP_PARTITION_ATTR_UPDATED.
David Anderson [Tue, 27 Aug 2019 20:44:48 +0000 (13:44 -0700)]
Update lpdump to recognize LP_PARTITION_ATTR_UPDATED.

Bug: 139154795
Test: lpdump after update
Change-Id: I4cbfe80c15cfa0afe3e9d37e3f8818016e57daa2

4 years agoMerge "Move fscrypt_init_extensions into system/core"
Paul Crowley [Tue, 27 Aug 2019 01:03:14 +0000 (18:03 -0700)]
Merge "Move fscrypt_init_extensions into system/core"
am: 39e92468ad

Change-Id: I14922f2abc8ca1644fdedcdb51a3d5409df54f58

4 years agoMerge "If the rollback directories won't encrypt, wipe them"
Paul Crowley [Tue, 27 Aug 2019 00:50:56 +0000 (17:50 -0700)]
Merge "If the rollback directories won't encrypt, wipe them"
am: 43ce86f084

Change-Id: Ib592f2e3fc0215dea881df16adf85569354edc30

4 years agoMerge "Move fscrypt_init_extensions into system/core"
Treehugger Robot [Mon, 26 Aug 2019 23:24:54 +0000 (23:24 +0000)]
Merge "Move fscrypt_init_extensions into system/core"

4 years agoMerge "If the rollback directories won't encrypt, wipe them"
Treehugger Robot [Mon, 26 Aug 2019 23:24:49 +0000 (23:24 +0000)]
Merge "If the rollback directories won't encrypt, wipe them"

4 years agoMove fscrypt_init_extensions into system/core
Paul Crowley [Mon, 26 Aug 2019 17:30:54 +0000 (10:30 -0700)]
Move fscrypt_init_extensions into system/core

Bug: 140027478
Test: treehugger
Change-Id: I296ce6d1272816c237e1ad213fbdef9f6fafb44f

4 years agoIf the rollback directories won't encrypt, wipe them
Paul Crowley [Fri, 9 Aug 2019 21:19:11 +0000 (14:19 -0700)]
If the rollback directories won't encrypt, wipe them

/data/rollback and /data/rollback-observer used to be created
unencrypted by system-server. If they are unencrypted and have
content, force them to be encrypted by wiping their contents.

Bug: b/139193659
Test: Put content in these directories, then reboot and see it wiped.
Cherrypicked-from: 58a49c3ae59d250cc1db49ce5a2678bf19bb92c3
Change-Id: I0320eb645ebe86965928acbacc8ad01dae2d5ba5
Merged-In: I0320eb645ebe86965928acbacc8ad01dae2d5ba5

4 years agoMerge "simpleperf: fix is_elf_file."
Yabin Cui [Thu, 22 Aug 2019 21:23:47 +0000 (14:23 -0700)]
Merge "simpleperf: fix is_elf_file."
am: abde21870e

Change-Id: Ie8001786fec5cb09e2ce76d9fe4b882b2ff18b0a

4 years agoMerge "simpleperf: add inject cmd."
Yabin Cui [Thu, 22 Aug 2019 21:22:46 +0000 (14:22 -0700)]
Merge "simpleperf: add inject cmd."
am: 93dac5f6ac

Change-Id: I471c37642d76de90af2c4938a6b6e1e93db2737a

4 years agoMerge "simpleperf: fix is_elf_file."
Yabin Cui [Thu, 22 Aug 2019 20:56:08 +0000 (20:56 +0000)]
Merge "simpleperf: fix is_elf_file."

4 years agoMerge "simpleperf: add inject cmd."
Yabin Cui [Thu, 22 Aug 2019 20:55:46 +0000 (20:55 +0000)]
Merge "simpleperf: add inject cmd."

4 years agosimpleperf: fix is_elf_file.
Yabin Cui [Thu, 22 Aug 2019 17:50:19 +0000 (10:50 -0700)]
simpleperf: fix is_elf_file.

When running by python3, is_elf_file() decodes first 4 bytes of
a file, which may cause UnicodeDecodeError.

Bug: none
Test: run test.py TestTools.test_is_elf_file.
Change-Id: Ie19e4869f876bb92155d849c814c8f39989c443b

4 years agosimpleperf: add inject cmd.
Yabin Cui [Wed, 21 Aug 2019 23:05:07 +0000 (16:05 -0700)]
simpleperf: add inject cmd.

Add inject cmd to convert etm data into executed instr ranges.

Bug: 135204414
Test: run simpleperf_unit_test.
Change-Id: I46acf7b24ddb4865d0925f70e09b861b7f6748b6

4 years agoMerge "simpleperf: add --use-devfreq-counters option."
Yabin Cui [Wed, 21 Aug 2019 00:18:49 +0000 (17:18 -0700)]
Merge "simpleperf: add --use-devfreq-counters option."
am: 5ff5b91fdc

Change-Id: I6f741f3981256dafb9713684bda6a3d8ec2f6182

4 years agoMerge "simpleperf: add --use-devfreq-counters option."
Yabin Cui [Tue, 20 Aug 2019 23:45:11 +0000 (23:45 +0000)]
Merge "simpleperf: add --use-devfreq-counters option."

4 years agoMerge "simpleperf: Add ETMDecoder."
Yabin Cui [Tue, 20 Aug 2019 23:27:02 +0000 (16:27 -0700)]
Merge "simpleperf: Add ETMDecoder."
am: 0441e116a8

Change-Id: I14f7f4fa991785bc03036ce7b046723342223491

4 years agoMerge "simpleperf: Add ETMDecoder."
Yabin Cui [Tue, 20 Aug 2019 23:08:37 +0000 (23:08 +0000)]
Merge "simpleperf: Add ETMDecoder."

4 years agosimpleperf: add --use-devfreq-counters option.
Yabin Cui [Mon, 12 Aug 2019 23:53:46 +0000 (16:53 -0700)]
simpleperf: add --use-devfreq-counters option.

On devices like pixel 3, there are 7 hardware counters in cpu pmu.
But 4 of them are used by devfreq to monitor memory latency.
In case we need more than 3 counters, add an option to let devfreq
release counters.

Also add a warning of using this option if it seems we need more
counters.

Bug: none
Test: run simpleperf_unit_test.
Change-Id: I9a13716a8b64c8e0fc03a79b0c11dd29da169c56

4 years agoMerge "simpleperf: update building prebuilts."
Yabin Cui [Tue, 20 Aug 2019 21:02:17 +0000 (14:02 -0700)]
Merge "simpleperf: update building prebuilts."
am: d1df579357

Change-Id: Ic38640eccc732b298b94ab4f6b5a49a307f441bf

4 years agosimpleperf: Add ETMDecoder.
Yabin Cui [Fri, 9 Aug 2019 01:15:14 +0000 (18:15 -0700)]
simpleperf: Add ETMDecoder.

It contains below changes:
1. Add ETMDecoder, which uses OpenCSD library to decode etm data.
2. Fix trace ids in AuxTraceInfoRecord to match those in etm data.
3. Dump build ids for all binaries in record cmd, to find them in
   etm decoding.
4. Add options in dump cmd to dump etm data.
5. Add a test line in dump cmd test to check that instruction range
elements are decoded and dumped.

Bug: 135204414
Test: run simpleperf_unit_test.

Change-Id: Iad1a1dac3dd9aaed4416ff2c19029c676d610783

4 years agoMerge "simpleperf: update building prebuilts."
Yabin Cui [Tue, 20 Aug 2019 20:23:09 +0000 (20:23 +0000)]
Merge "simpleperf: update building prebuilts."

4 years agosimpleperf: update building prebuilts.
Yabin Cui [Tue, 20 Aug 2019 17:32:56 +0000 (10:32 -0700)]
simpleperf: update building prebuilts.

1. add simpleperf_scripts in simpleperf dist build.
2. remove simpleperf in sdk,win_sdk dist build.

Bug: none
Test: run build/soong/soong_ui.bash --make-mode
Test: MODULES-IN-system-extras-simpleperf dist
Test: TARGET_PRODUCT=aosp_arm64 simpleperf
Change-Id: Ica63c106b67d3ec7400c0f7148fd78f65d6d16c3

4 years agoMerge "simpleperf: update simpleperf prebuilts to build 5806936."
Yabin Cui [Mon, 19 Aug 2019 20:29:47 +0000 (13:29 -0700)]
Merge "simpleperf: update simpleperf prebuilts to build 5806936."
am: e2af8d6b15

Change-Id: I831e836071fce2cb5332cd30a94025c96a8a0744

4 years agoMerge "simpleperf: update simpleperf prebuilts to build 5806936."
Yabin Cui [Mon, 19 Aug 2019 19:24:11 +0000 (19:24 +0000)]
Merge "simpleperf: update simpleperf prebuilts to build 5806936."

4 years agosimpleperf: update simpleperf prebuilts to build 5806936.
Yabin Cui [Fri, 16 Aug 2019 18:00:22 +0000 (11:00 -0700)]
simpleperf: update simpleperf prebuilts to build 5806936.

Taken from branch aosp-simpleperf-release.

Bug: none
Test: run test.py on Android master/Q/P/O/N.

Change-Id: Ib527b0ba17f8c583359e157198b5b93fdac88c45

4 years agoAdd support for new taskstats v9 functionality
Peter Enderborg [Tue, 30 Jul 2019 07:32:39 +0000 (09:32 +0200)]
Add support for new taskstats v9 functionality

Kernel ABI for taskstats has been uptated to version 9.
Thrashing data is the base for PSI used by userspace lmk,
so good to expose here for debugging purposes.

Issue: 139647514
Test: manual
Change-Id: Ifddb40537abaf10908426b3cd5c0dc177f69ee56

4 years agoMerge "simpleperf: Update apks for testing ApiProfiler."
Yabin Cui [Fri, 16 Aug 2019 18:26:47 +0000 (11:26 -0700)]
Merge "simpleperf: Update apks for testing ApiProfiler."
am: 3c9e6a09ca

Change-Id: I801bed79640c429244a929bcfe35afe850ba5d26

4 years agoMerge "simpleperf: Update apks for testing ApiProfiler."
Yabin Cui [Fri, 16 Aug 2019 17:52:36 +0000 (17:52 +0000)]
Merge "simpleperf: Update apks for testing ApiProfiler."

4 years agosimpleperf: Update apks for testing ApiProfiler.
Yabin Cui [Fri, 16 Aug 2019 17:48:54 +0000 (10:48 -0700)]
simpleperf: Update apks for testing ApiProfiler.

The previous apks has error in sdk version setting, thus
fail to install on master.

Bug: none
Test: run test.py TestApiProfiler.* on master/Q/P/O/N.
Change-Id: I6ef7eabcc0602147b0aa31dc9b3d5bac616e1e83

4 years agoMerge "Add new traces."
Christopher Ferris [Thu, 15 Aug 2019 14:41:19 +0000 (07:41 -0700)]
Merge "Add new traces."
am: 3b4faa69d0

Change-Id: I0eeaec19946a31fb004e936fb3f3a02df4cd3c97

4 years agoMerge "Add new traces."
Christopher Ferris [Thu, 15 Aug 2019 14:17:49 +0000 (14:17 +0000)]
Merge "Add new traces."

4 years agoAdd new traces.
Christopher Ferris [Wed, 14 Aug 2019 22:10:13 +0000 (15:10 -0700)]
Add new traces.

Updates included:
- Adding traces from a few games and one top app (Angry Birds2, Candy Crush,
  Pubg, Google Photos).
- Change the dumps directory to traces to use a better name.
- Add new traces to TraceBenchmark.cpp.
- Add a TRACES file that includes information about how the trace files
  were collected.

Test: Unit tests pass.
Test: Ran the trace benchmarks.

Change-Id: I8d60db23cf78dd31977bb81d29749c06e1df354d

5 years agoMerge "Fix test broken by PSS to RSS change."
Christopher Ferris [Fri, 9 Aug 2019 15:47:29 +0000 (08:47 -0700)]
Merge "Fix test broken by PSS to RSS change."
am: c0dabf28ca

Change-Id: I0448f6455c48b166c59887716c5c1a11eff40692

5 years agoMerge "Fix test broken by PSS to RSS change."
Christopher Ferris [Fri, 9 Aug 2019 15:36:07 +0000 (15:36 +0000)]
Merge "Fix test broken by PSS to RSS change."

5 years agoMerge "simpleperf: add --aux-buffer-size in record cmd."
Yabin Cui [Fri, 9 Aug 2019 01:04:17 +0000 (18:04 -0700)]
Merge "simpleperf: add --aux-buffer-size in record cmd."
am: f36aa2b28a

Change-Id: Ifac3113a2ba15fa0cb45d9afc8eaa88851286c99

5 years agoMerge "simpleperf: add --aux-buffer-size in record cmd."
Yabin Cui [Fri, 9 Aug 2019 00:36:16 +0000 (00:36 +0000)]
Merge "simpleperf: add --aux-buffer-size in record cmd."

5 years agoFix test broken by PSS to RSS change.
Christopher Ferris [Thu, 8 Aug 2019 22:07:36 +0000 (15:07 -0700)]
Fix test broken by PSS to RSS change.

Also, make the tests isolated and remove the suffix on the unit
test executable.

Bug: 138394907

Test: Unit tests pass now.
Change-Id: Iefe0e1738a2c9eda5cc220c55dfd91e4ff0e5a5f

5 years agosimpleperf: add --aux-buffer-size in record cmd.
Yabin Cui [Sat, 3 Aug 2019 00:12:28 +0000 (17:12 -0700)]
simpleperf: add --aux-buffer-size in record cmd.

Bug: 135204414
Test: run simpleperf_unit_test.
Change-Id: I6baee8a2b178a374e446e0da4792eb9287bba6b1

5 years agoMerge "simpleperf: add AuxRecord and AUXTRACE feature section."
Yabin Cui [Thu, 8 Aug 2019 20:21:24 +0000 (13:21 -0700)]
Merge "simpleperf: add AuxRecord and AUXTRACE feature section."
am: 0ac62db142

Change-Id: Ia0dd643f87a7766eeab034f44236e86ebcc02cf7

5 years agoMerge "simpleperf: add AuxRecord and AUXTRACE feature section."
Treehugger Robot [Thu, 8 Aug 2019 19:58:25 +0000 (19:58 +0000)]
Merge "simpleperf: add AuxRecord and AUXTRACE feature section."

5 years agosimpleperf: add AuxRecord and AUXTRACE feature section.
Yabin Cui [Fri, 2 Aug 2019 18:35:38 +0000 (11:35 -0700)]
simpleperf: add AuxRecord and AUXTRACE feature section.

In the kernel, each time generating a block of etm data, it also
generates a PERF_RECORD_AUX record. An Aux record contains a timestamp
showing when a block of etm data is generated. It can be used to
synchronize etm data with other records (like mmap and comm records).

So we want to parse etm data each time seeing an Aux record (as in dump
cmd). It needs to know etm data locations in perf.data without reading
the whole file. To fulfill that, this CL also adds AUXTRACE feature section,
in the same format as in linux perf.

Also dump AUX records and their corresponding etm data in dump cmd.

Bug: 135204414
Test: run simpleperf_unit_test.
Test: run `simpleperf record -e cs-etm xxx` && `perf report -D --stdio`.

Change-Id: Ifae716a10fefe0f3d4822a0214384b40ada9da45

5 years agoMerge "Change from PSS to RSS."
Christopher Ferris [Thu, 8 Aug 2019 01:48:21 +0000 (18:48 -0700)]
Merge "Change from PSS to RSS."
am: 87062f382d

Change-Id: Ibb7cb2927b699d909aa0afe08966f1f37e279698

5 years agoMerge "Change from PSS to RSS."
Christopher Ferris [Thu, 8 Aug 2019 01:25:23 +0000 (01:25 +0000)]
Merge "Change from PSS to RSS."

5 years agoChange from PSS to RSS.
Christopher Ferris [Wed, 7 Aug 2019 21:31:25 +0000 (14:31 -0700)]
Change from PSS to RSS.

In practice, PSS and RSS should be the same for this test, but what
we are really measuring is RSS, so display it as such.

Bug: 138394907

Test: Ran memory_replay32/64 and verified that new RSS is the same as
Test: old version that used PSS.
Change-Id: Ida92e4551f5b58729cd699bc9a296d324483daae

5 years agoMerge "simpleperf: fix report_html.py."
Yabin Cui [Sat, 3 Aug 2019 00:22:36 +0000 (17:22 -0700)]
Merge "simpleperf: fix report_html.py."
am: fe6f4fa2ad

Change-Id: Ieabe6d4a1f21b87962537d5b323fccc0ce920e9a

5 years agoMerge "simpleperf: fix report_html.py."
Yabin Cui [Sat, 3 Aug 2019 00:06:01 +0000 (00:06 +0000)]
Merge "simpleperf: fix report_html.py."

5 years agoMerge "libfscrypt: Remove an unused variable"
Vic Yang [Fri, 2 Aug 2019 23:47:32 +0000 (16:47 -0700)]
Merge "libfscrypt: Remove an unused variable"
am: a596802d39

Change-Id: I6554b3b5c144123fbf709db577191394d8a7b81c

5 years agosimpleperf: fix report_html.py.
Yabin Cui [Fri, 2 Aug 2019 23:31:40 +0000 (16:31 -0700)]
simpleperf: fix report_html.py.

report_html.py removes threads having too small percentage
of samples. But it doesn't remove processes having no threads,
which makes showing flamegraph broken.

Bug: none
Test: run test.py TestReportHtml.test_no_empty_process.
Change-Id: I3d568c98f0426a8ebbc9760dbc3c2bd25eda4c67

5 years agoMerge "libfscrypt: Remove an unused variable"
Treehugger Robot [Fri, 2 Aug 2019 23:05:22 +0000 (23:05 +0000)]
Merge "libfscrypt: Remove an unused variable"

5 years agolibfscrypt: Remove an unused variable
Vic Yang [Fri, 2 Aug 2019 20:40:51 +0000 (13:40 -0700)]
libfscrypt: Remove an unused variable

This is the only object in .bss in libfscrypt and it's unused, so it's
costing us 4KB for nothing.  Remove it.

Bug: 138856262
Test: objdump -h libfscrypt.so. Check .bss is gone.
Change-Id: Iac5eff45e28453f09d380c10a1818eb53ed2fe48

5 years agoMerge "simpleperf: support recording etm data in perf.data."
Yabin Cui [Thu, 1 Aug 2019 20:25:11 +0000 (13:25 -0700)]
Merge "simpleperf: support recording etm data in perf.data."
am: 9a3596488e

Change-Id: I50a35dff5b424ab13d56f1a8a7497c57f1d31114

5 years agoMerge "simpleperf: support recording etm data in perf.data."
Treehugger Robot [Thu, 1 Aug 2019 19:51:50 +0000 (19:51 +0000)]
Merge "simpleperf: support recording etm data in perf.data."

5 years agoMerge "Simpleperf: Add max_chain_length to pprof_proto_generator.py"
Andreas Gampe [Tue, 30 Jul 2019 16:32:17 +0000 (09:32 -0700)]
Merge "Simpleperf: Add max_chain_length to pprof_proto_generator.py"
am: 471bffe67d

Change-Id: I0896f0a18c086611c30b0840ef6f66c9aff3be72

5 years agoMerge "Simpleperf: Add max_chain_length to pprof_proto_generator.py"
Treehugger Robot [Tue, 30 Jul 2019 16:09:50 +0000 (16:09 +0000)]
Merge "Simpleperf: Add max_chain_length to pprof_proto_generator.py"

5 years agoSimpleperf: Add max_chain_length to pprof_proto_generator.py
Andreas Gampe [Mon, 29 Jul 2019 16:56:12 +0000 (09:56 -0700)]
Simpleperf: Add max_chain_length to pprof_proto_generator.py

Add an option to truncate very long callchains.

Test: m
Test: manual
Change-Id: I6892597f58bf6a8381b455c8f288b29f00a75f70

5 years agosimpleperf: support recording etm data in perf.data.
Yabin Cui [Thu, 25 Jul 2019 22:12:58 +0000 (15:12 -0700)]
simpleperf: support recording etm data in perf.data.

1. In event_fd.cpp, add functions to create aux buffer and read etm
data.
2. In record.h, Add AuxTraceRecord.
2. In RecordReadThread.cpp, wrap etm data into AuxTraceRecords.
3. Add logic to read and write AuxTraceRecords in perf.data.
4. Show recorded etm data size after recording.

Bug: 135204414
Test: run simpleperf_unit_test.
Change-Id: I3b20fe8f3c786f130f38e34962ca9f86a31fc584

5 years agoMerge "Simpleperf: Restrict callchain depth in inferno"
Andreas Gampe [Wed, 24 Jul 2019 16:20:46 +0000 (09:20 -0700)]
Merge "Simpleperf: Restrict callchain depth in inferno"
am: 14c83fced1

Change-Id: Id3a73e8867647270c42a271e97478510a7bad55d

5 years agoMerge "Simpleperf: Restrict callchain depth in inferno"
Treehugger Robot [Wed, 24 Jul 2019 15:43:32 +0000 (15:43 +0000)]
Merge "Simpleperf: Restrict callchain depth in inferno"

5 years agoSimpleperf: Restrict callchain depth in inferno
Andreas Gampe [Tue, 23 Jul 2019 20:19:23 +0000 (13:19 -0700)]
Simpleperf: Restrict callchain depth in inferno

Add an option to restrict the callchain depth in inferno, so as
to cope with deep stack that otherwise lead to a python stack
overflow.

Use a large value as a stand-in for unlimited. Try to capture
stack overflow and add a message to try the parameter.

Test: manual
Change-Id: I411b4210ad7ddb8c418a8142b0392df192111e06

5 years agoMerge "simpleperf: fix filters in pprof_proto_generator.py."
Yabin Cui [Tue, 23 Jul 2019 18:42:05 +0000 (11:42 -0700)]
Merge "simpleperf: fix filters in pprof_proto_generator.py."
am: bcbd17bd40

Change-Id: I9dd886438bcfc43ff203255163fe49c8e96bb959

5 years agoMerge "simpleperf: add --log option in app_profiler.py."
Yabin Cui [Tue, 23 Jul 2019 18:41:01 +0000 (11:41 -0700)]
Merge "simpleperf: add --log option in app_profiler.py."
am: 661952850c

Change-Id: Ic58767ed8bc5b2982a018e2928a06935027b34d2

5 years agoMerge "simpleperf: fix filters in pprof_proto_generator.py."
Yabin Cui [Tue, 23 Jul 2019 18:08:52 +0000 (18:08 +0000)]
Merge "simpleperf: fix filters in pprof_proto_generator.py."

5 years agoMerge "simpleperf: add --log option in app_profiler.py."
Yabin Cui [Tue, 23 Jul 2019 18:07:40 +0000 (18:07 +0000)]
Merge "simpleperf: add --log option in app_profiler.py."