OSDN Git Service

android-x86/system-extras.git
4 years agoMerge changes I51ee7070,I499a70a9
Eric Biggers [Thu, 5 Sep 2019 23:48:16 +0000 (16:48 -0700)]
Merge changes I51ee7070,I499a70a9
am: 59e1ab234c

Change-Id: I86d5c8b423f26c3a965bedad59753d374d137306

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 ago[automerger skipped] Merge "DO NOT MERGE - Merge Android 10 into master"
Xin Li [Thu, 5 Sep 2019 22:37:56 +0000 (15:37 -0700)]
[automerger skipped] Merge "DO NOT MERGE - Merge Android 10 into master"
am: 3342738e82 -s ours
am skip reason: subject contains skip directive

Change-Id: I9e2672405aa2f59974a08b52107ff7aaaefda422

4 years ago[automerger skipped] DO NOT MERGE - Merge Android 10 into master
Xin Li [Thu, 5 Sep 2019 20:28:16 +0000 (13:28 -0700)]
[automerger skipped] DO NOT MERGE - Merge Android 10 into master
am: cbe369529b -s ours
am skip reason: subject contains skip directive

Change-Id: I76cba1e4ee0e5be64c5a16d00c691159f9022fed

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 "simpleperf: support profiling art interpreter on linux host."
Yabin Cui [Thu, 5 Sep 2019 16:59:07 +0000 (09:59 -0700)]
Merge "simpleperf: support profiling art interpreter on linux host."
am: 749f0bac4a

Change-Id: Iac4e835efe67677c36aa1a29ab4eebc8a41d7633

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."

5 years agosimpleperf: add --log option in app_profiler.py.
Yabin Cui [Mon, 22 Jul 2019 19:33:47 +0000 (12:33 -0700)]
simpleperf: add --log option in app_profiler.py.

The default log output of app_profiler.py is too verbose. So add
--log option to adjust it, and omit debug outputs by default.

Bug: 138112297
Test: run app_profiler.py manually.
Change-Id: I9f08d3eeb890347a1017b5b39832dc2cc3a9e2af

5 years agosimpleperf: fix filters in pprof_proto_generator.py.
Yabin Cui [Mon, 22 Jul 2019 18:39:36 +0000 (11:39 -0700)]
simpleperf: fix filters in pprof_proto_generator.py.

Bug: 138107481
Test: run test.py TestPprof*.
Change-Id: I3344c4252ca469845e3844c0f2de447f293c38d1

5 years agoMerge "simpleperf: set scoped arch and event types in RecordFileReader."
Yabin Cui [Fri, 19 Jul 2019 19:19:55 +0000 (12:19 -0700)]
Merge "simpleperf: set scoped arch and event types in RecordFileReader."
am: 8ec32656b3

Change-Id: I6d472a70264cac1e55b397b3dd6cb99819c5a8d0

5 years agoMerge "simpleperf: add PERF_RECORD_AUXTRACE_INFO record."
Yabin Cui [Fri, 19 Jul 2019 19:18:49 +0000 (12:18 -0700)]
Merge "simpleperf: add PERF_RECORD_AUXTRACE_INFO record."
am: b332597c03

Change-Id: Iad4253685b47a0d6387212750fddcccb886f4802

5 years agoMerge "simpleperf: set scoped arch and event types in RecordFileReader."
Yabin Cui [Fri, 19 Jul 2019 18:49:57 +0000 (18:49 +0000)]
Merge "simpleperf: set scoped arch and event types in RecordFileReader."

5 years agoMerge "simpleperf: add PERF_RECORD_AUXTRACE_INFO record."
Yabin Cui [Fri, 19 Jul 2019 18:49:36 +0000 (18:49 +0000)]
Merge "simpleperf: add PERF_RECORD_AUXTRACE_INFO record."

5 years agosimpleperf: add PERF_RECORD_AUXTRACE_INFO record.
Yabin Cui [Wed, 17 Jul 2019 23:59:48 +0000 (16:59 -0700)]
simpleperf: add PERF_RECORD_AUXTRACE_INFO record.

PERF_RECORD_AUXTRACE_INFO is used to record etm configurations on device.
Make its content the same as in linux perf.

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

5 years agosimpleperf: set scoped arch and event types in RecordFileReader.
Yabin Cui [Fri, 19 Jul 2019 00:27:48 +0000 (17:27 -0700)]
simpleperf: set scoped arch and event types in RecordFileReader.

To record on device and report on host, simpleperf keeps arch type
and event types in perf.data. Currently, RecordFileReader needs
its users to read and set the arch type and event types properly.

This patch changes to let RecordFileReader set arch type and
event types. It avoids repeating the effort in users of
RecordFileReader.

Bug: none
Test: run simpleperf_unit_test.
Test: run simpleperf record on device, and report it on host.
Change-Id: Ief637ca6e2c3acfbf74b6447ef7ff0679439ca1d

5 years agoMerge "simpleperf: don't expose libunwindstack in OfflineUnwinder.h."
Yabin Cui [Thu, 18 Jul 2019 20:09:13 +0000 (13:09 -0700)]
Merge "simpleperf: don't expose libunwindstack in OfflineUnwinder.h."
am: 168d61edeb

Change-Id: I48bde09580616ab6e3b1cd8140820d097ca09dc7

5 years agoMerge "simpleperf: don't expose libunwindstack in OfflineUnwinder.h."
Yabin Cui [Thu, 18 Jul 2019 19:29:19 +0000 (19:29 +0000)]
Merge "simpleperf: don't expose libunwindstack in OfflineUnwinder.h."

5 years agosimpleperf: don't expose libunwindstack in OfflineUnwinder.h.
Yabin Cui [Thu, 18 Jul 2019 17:43:32 +0000 (10:43 -0700)]
simpleperf: don't expose libunwindstack in OfflineUnwinder.h.

It is to build etm decode library happen to include
OfflineUnwinder.h, but don't link with libunwindstack.

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

5 years agoMerge "simpleperf: fix raw event names."
Yabin Cui [Wed, 17 Jul 2019 21:10:05 +0000 (14:10 -0700)]
Merge "simpleperf: fix raw event names."
am: 193ca49c16

Change-Id: I3e5429beeb007dafe5665e5a56d723168af3b140

5 years agoMerge "simpleperf: fix raw event names."
Yabin Cui [Wed, 17 Jul 2019 20:51:45 +0000 (20:51 +0000)]
Merge "simpleperf: fix raw event names."