OSDN Git Service

android-x86/system-extras.git
7 years agoMerge "simpleperf: fix potential unaligned memory access."
Yabin Cui [Mon, 14 Nov 2016 23:56:05 +0000 (23:56 +0000)]
Merge "simpleperf: fix potential unaligned memory access."

7 years agosimpleperf: fix potential unaligned memory access.
Yabin Cui [Mon, 14 Nov 2016 19:23:14 +0000 (11:23 -0800)]
simpleperf: fix potential unaligned memory access.

1. It is reported that when elf section headers are malformed,
GetBuildIdFromNoteSection() aborts with SIGBUS. So fix it to
accept not 4 bytes aligned section data.
2. Fix potential unaligned memory access in ConvertBytesToValue().

Test: run simpleperf_unit_test.
Change-Id: I2e1612a6567978e0b526b2274377765ba2837ec2

7 years agoMerge "simpleperf: dump only needed symbols in file feature section."
Yabin Cui [Sat, 12 Nov 2016 01:08:38 +0000 (01:08 +0000)]
Merge "simpleperf: dump only needed symbols in file feature section."

7 years agosimpleperf: dump only needed symbols in file feature section.
Yabin Cui [Fri, 11 Nov 2016 22:53:52 +0000 (14:53 -0800)]
simpleperf: dump only needed symbols in file feature section.

Instead of dumping all symbols in the hit elf files, dump only
needed symbols can save a lot of space. To do so, read perf.data
after recording to collect hit file and symbol information.

Bug: http://b/32340274
Test: test using `simpleperf record --dump-symbols` manually.
Test: run simpleperf_unit_test.
Change-Id: I480f3e2e7ccebfbb5df16a597724f5f40d62c821

7 years agoMerge "simpleperf: update report shared library."
Yabin Cui [Fri, 11 Nov 2016 20:03:57 +0000 (20:03 +0000)]
Merge "simpleperf: update report shared library."

7 years agoMerge "simpleperf: fix unaligned data access on arm."
Yabin Cui [Fri, 11 Nov 2016 20:03:35 +0000 (20:03 +0000)]
Merge "simpleperf: fix unaligned data access on arm."

7 years agoMerge "simpleperf: use file records in protobuf output."
Yabin Cui [Fri, 11 Nov 2016 01:14:26 +0000 (01:14 +0000)]
Merge "simpleperf: use file records in protobuf output."

7 years agosimpleperf: use file records in protobuf output.
Yabin Cui [Wed, 19 Oct 2016 22:06:29 +0000 (15:06 -0700)]
simpleperf: use file records in protobuf output.

Dump file name and symbol name for each CallChainEntry
takes too much space. So instead we store file_id and
symbol_id for each CallChainEntry, and store file
records separately.

In CallChainEntry, replace ip with vaddr_in_file, because
vaddr_in_file is more useful in finding instructions in
elf file.

Bug: http://b/32210800
Test: simpleperf_unit_test.
Change-Id: I85542db21acbaa4d81b3c3aa7f9215f2d23c4878

7 years agosimpleperf: fix unaligned data access on arm.
Yabin Cui [Thu, 10 Nov 2016 23:25:15 +0000 (15:25 -0800)]
simpleperf: fix unaligned data access on arm.

Bug: http://b/32340274
Test: run `simpleperf record --dump-symbols` manually.
Test: run simpleperf_unit_test.
Change-Id: I771a516bb644f18fafa987061ecfc76ae3521ca9

7 years agosimpleperf: update report shared library.
Yabin Cui [Thu, 10 Nov 2016 22:40:02 +0000 (14:40 -0800)]
simpleperf: update report shared library.

So it can read the newly added file section.

Bug: http://b/32340274
Test: run `python report-sample.py`.
Change-Id: I22dadd2b3a18f9f40a13ff370eb73b3c6b7a2adf

7 years agoMerge "Rename libfec_host to libfec."
Alex Deymo [Wed, 9 Nov 2016 19:02:16 +0000 (19:02 +0000)]
Merge "Rename libfec_host to libfec."

7 years agoRename libfec_host to libfec.
Alex Deymo [Wed, 9 Nov 2016 03:13:52 +0000 (19:13 -0800)]
Rename libfec_host to libfec.

Host libraries don't need to have a different name from the device target.

Bug: None
Test: `make dist`
Change-Id: Ib7709a327ac2fdbdfb131e40f578217633e1f996

7 years agoMerge "simpleperf: make file feature section used in more report commands."
Yabin Cui [Mon, 7 Nov 2016 19:05:55 +0000 (19:05 +0000)]
Merge "simpleperf: make file feature section used in more report commands."

7 years agosimpleperf: make file feature section used in more report commands.
Yabin Cui [Fri, 4 Nov 2016 23:49:35 +0000 (16:49 -0700)]
simpleperf: make file feature section used in more report commands.

Bug: http://b/32340274
Test: run simpleperf_unit_test.
Change-Id: I0bed466c145fdbb2988308f56a031c06bad16352

7 years agoMerge "simpleperf: dump file feature section."
Yabin Cui [Fri, 4 Nov 2016 18:37:00 +0000 (18:37 +0000)]
Merge "simpleperf: dump file feature section."

7 years agosimpleperf: dump file feature section.
Yabin Cui [Mon, 24 Oct 2016 20:38:38 +0000 (13:38 -0700)]
simpleperf: dump file feature section.

For `record --dump-symbols` option, change from dumping
DsoRecord and SymbolRecord to dumping file feature section.
It is to avoid reading symbols from elf files during recording,
which takes a lot of time. And we don't want to mix optional
data (the symbol tables) with necessary data (the profiling records).

Bug: http://b/32340274
Test: run simpleperf_unit_test.
Test: run simpleperf runtest.py.

Change-Id: I0a387de243afac93486fc885f223a58060ec07f4

7 years agoMerge "simpleperf: remove external sort."
Yabin Cui [Mon, 31 Oct 2016 17:33:58 +0000 (17:33 +0000)]
Merge "simpleperf: remove external sort."

7 years agoMerge "simpleperf: avoid errors/warnings caused by sepolicy."
Yabin Cui [Sat, 29 Oct 2016 02:10:20 +0000 (02:10 +0000)]
Merge "simpleperf: avoid errors/warnings caused by sepolicy."

7 years agosimpleperf: remove external sort.
Yabin Cui [Sat, 29 Oct 2016 01:50:04 +0000 (18:50 -0700)]
simpleperf: remove external sort.

Also remove set low mark for dwarf callgraph recording.

Bug: http://b/32343227
Test: run simpleperf runtest.py.
Test: run simpleperf_unit_test.
Change-Id: I57c0146b0a52cc1bb940a54f685058fe00677992

7 years agosimpleperf: avoid errors/warnings caused by sepolicy.
Yabin Cui [Fri, 28 Oct 2016 20:27:41 +0000 (13:27 -0700)]
simpleperf: avoid errors/warnings caused by sepolicy.

If running in an app user id, sepolicy doesn't allow reading
many /proc and /sys files, like /proc/<pid> belonging to
other users, /sys/kernel/notes, /proc/sys/kernel/perf_event_paranoid,
/proc/sys/kernel/kptr_restrict.
With this patch, simpleperf doesn't read /proc/<pid> belonging to
other users, and doesn't report error/warning when failing to read
/proc/sys/* files.

Bug: http://b/32460013
Test: run `simpleperf record` in an app user id.
Test: run simpleperf_unit_test.
Test: run simpleperf runtest.py.
Change-Id: I6618fbd10a9112637c8e501ec76628c9ec4ccaa7

7 years agoMerge "Convert perfprofd to Android.bp"
Treehugger Robot [Fri, 28 Oct 2016 20:04:49 +0000 (20:04 +0000)]
Merge "Convert perfprofd to Android.bp"

7 years agoConvert perfprofd to Android.bp
Colin Cross [Wed, 26 Oct 2016 17:23:15 +0000 (10:23 -0700)]
Convert perfprofd to Android.bp

See build/soong/README.md for more information.

Converted as a test for .proto compilation support.

Bug: 32286026
Test: perfprofd_test
Change-Id: I1e0934aa5bf4649d598ec460128de6f02711597f

7 years agoMerge "simpleperf: Add UnixSocket."
Yabin Cui [Thu, 27 Oct 2016 16:26:41 +0000 (16:26 +0000)]
Merge "simpleperf: Add UnixSocket."

7 years agoMerge "simpleperf: merge records from different buffers in memory."
Yabin Cui [Thu, 27 Oct 2016 16:26:19 +0000 (16:26 +0000)]
Merge "simpleperf: merge records from different buffers in memory."

7 years agoMerge "simpleperf: reduce default test log output."
Yabin Cui [Thu, 27 Oct 2016 16:26:00 +0000 (16:26 +0000)]
Merge "simpleperf: reduce default test log output."

7 years agosimpleperf: merge records from different buffers in memory.
Yabin Cui [Tue, 25 Oct 2016 02:13:09 +0000 (19:13 -0700)]
simpleperf: merge records from different buffers in memory.

By reading records from all buffers at once, we can merge records
in memory instead of sorting them in perf.data. To make it clear,
this patch only contains the code to merge records in memory, and
I will remove old method later.

Bug: http://b/32343227
Test: run simpleperf_unit_test.
Test: run simpleperf_runtest.py.
Change-Id: Iea2da06c072243c2014f43c8aa6d96a23cfb9123

7 years agosimpleperf: reduce default test log output.
Yabin Cui [Wed, 26 Oct 2016 23:17:25 +0000 (16:17 -0700)]
simpleperf: reduce default test log output.

Bug: http://b/32442055
Test: run simpleperf_cpu_hotplug_test.
Change-Id: I179a83cec98c6a32bdc9ba8ad403c199a8009f80

7 years agoMerge "Convert verity tools to subprocess"
Tianjie Xu [Wed, 26 Oct 2016 20:34:23 +0000 (20:34 +0000)]
Merge "Convert verity tools to subprocess"

7 years agosimpleperf: Add UnixSocket.
Yabin Cui [Mon, 24 Oct 2016 23:53:32 +0000 (16:53 -0700)]
simpleperf: Add UnixSocket.

It is used for communication between inplace-sampler-server and simpleperf.

Bug: http://b/30974760
Test: run simpleperf_unit_test.
Change-Id: I055763b73fd0aaa03fe008c185ca8b78ab5435f2

7 years agoConvert verity tools to subprocess
Tianjie Xu [Wed, 26 Oct 2016 01:11:24 +0000 (18:11 -0700)]
Convert verity tools to subprocess

Convert build_verity_metadata.py to subprocess instead of commands
module.

Bug: 31500725
Test: build_verity_metadata.py executes successfully
Change-Id: I9a0db78390d330710e62a710f8f957743aebd822

7 years agoMerge "Make simpleperf build with LLVM r275480"
Pirama Arumuga Nainar [Wed, 26 Oct 2016 17:35:50 +0000 (17:35 +0000)]
Merge "Make simpleperf build with LLVM r275480"

7 years agoMerge "Support verifying the boot signature against the given pubkey."
Treehugger Robot [Wed, 26 Oct 2016 17:17:36 +0000 (17:17 +0000)]
Merge "Support verifying the boot signature against the given pubkey."

7 years agoMake simpleperf build with LLVM r275480
Pirama Arumuga Nainar [Fri, 16 Sep 2016 23:53:25 +0000 (16:53 -0700)]
Make simpleperf build with LLVM r275480

Bug: http://b/31320715

Test: simpleperf_unit_test on host and target
Change-Id: I3b81884af6dc7371a91d1cd34b777e952e6c9d6b

7 years agoMerge "simpleperf: use Dso::IsHit() to mark hit binaries."
Yabin Cui [Tue, 25 Oct 2016 19:15:54 +0000 (19:15 +0000)]
Merge "simpleperf: use Dso::IsHit() to mark hit binaries."

7 years agosimpleperf: use Dso::IsHit() to mark hit binaries.
Yabin Cui [Mon, 24 Oct 2016 21:09:26 +0000 (14:09 -0700)]
simpleperf: use Dso::IsHit() to mark hit binaries.

Bug: http://b/32340274
Test: simpleperf_unit_test.
Change-Id: I074973cdc0420d28c7dfcaca80e477234bceec95

7 years agoMerge "Remove unused dependencies"
Michael Schwartz [Tue, 25 Oct 2016 15:31:40 +0000 (15:31 +0000)]
Merge "Remove unused dependencies"

7 years agoRemove unused dependencies
Michael Schwartz [Tue, 18 Oct 2016 17:36:50 +0000 (10:36 -0700)]
Remove unused dependencies

Bug: 32208916
Test: Builds on bullhead_treble-userdebug

Change-Id: I0933d2289a534c5260ad1826d88007ec7e4e5f43

7 years agoMerge "build_verity_metadata: Support --signer_args argument."
Tao Bao [Mon, 24 Oct 2016 18:50:14 +0000 (18:50 +0000)]
Merge "build_verity_metadata: Support --signer_args argument."

7 years agoMerge "simpleperf: fix dumping build id."
Yabin Cui [Mon, 24 Oct 2016 18:25:12 +0000 (18:25 +0000)]
Merge "simpleperf: fix dumping build id."

7 years agosimpleperf: fix dumping build id.
Yabin Cui [Sat, 22 Oct 2016 02:16:51 +0000 (19:16 -0700)]
simpleperf: fix dumping build id.

1. Dump build id for binaries hit by callchain ips.
2. Fix a memory used after free bug in ReadBuildIdFeature().

Bug: http://b/32340274
Test: simpleperf_unit_test.
Test: check output of `simpleperf dump` manually.
Change-Id: I0132e5ce0e06096413231325e9f1d215143eedd2

7 years agoMerge "simpleperf: support building sample record manually."
Yabin Cui [Thu, 20 Oct 2016 23:18:53 +0000 (23:18 +0000)]
Merge "simpleperf: support building sample record manually."

7 years agoMerge "libfec: correct verity table only if it's invalid"
Treehugger Robot [Thu, 20 Oct 2016 18:16:52 +0000 (18:16 +0000)]
Merge "libfec: correct verity table only if it's invalid"

7 years agosimpleperf: support building sample record manually.
Yabin Cui [Wed, 19 Oct 2016 18:28:48 +0000 (11:28 -0700)]
simpleperf: support building sample record manually.

And other small changes:
add time when building comm record.
move some Move*BinaryFormat to utils.h.
Handle wrong symbol whoes address can be ULLONG_MAX.

Bug: http://b/30974760
Test: simpleperf_unit_test.
Change-Id: I2956d3c4b781c580fe93a6e5b77e0469f7f4f43f

7 years agoMerge "simpleperf: add functions to IOEventLoop."
Yabin Cui [Thu, 20 Oct 2016 17:18:51 +0000 (17:18 +0000)]
Merge "simpleperf: add functions to IOEventLoop."

7 years agoMerge "Simpleperf: add --max-stack and --percent-limit options for report cmd."
Yabin Cui [Thu, 20 Oct 2016 17:18:35 +0000 (17:18 +0000)]
Merge "Simpleperf: add --max-stack and --percent-limit options for report cmd."

7 years agolibfec: correct verity table only if it's invalid
Sami Tolvanen [Wed, 19 Oct 2016 22:58:13 +0000 (15:58 -0700)]
libfec: correct verity table only if it's invalid

To increase reliability in the case where part of the partition is
corrupt and error correction might fail, attempt to use raw verity
table before the corrected one.

Bug: 32288104
Test: tested on angler
Change-Id: I201fdc6162c87b1808979486df5707d683a6d20c

7 years agoSimpleperf: add --max-stack and --percent-limit options for report cmd.
Yabin Cui [Thu, 29 Sep 2016 22:59:33 +0000 (15:59 -0700)]
Simpleperf: add --max-stack and --percent-limit options for report cmd.

Bug: http://b/24905115
Test: run simpleperf-unit-test.

Change-Id: I177f618f923f90069c0380063f0c3f93427dedd7

7 years agoSupport verifying the boot signature against the given pubkey.
Tao Bao [Wed, 19 Oct 2016 21:59:31 +0000 (14:59 -0700)]
Support verifying the boot signature against the given pubkey.

verify_boot_signature currently verifies the signature in the boot image
(against the certificate embedded in the image).

This CL supports additionally verifying the signature against the given
OEM pubkey (a fixed, tamper-protected key available to the bootloader).

Usage: verify_boot_signature <path-to-boot-image>
       verify_boot_signature <path-to-boot-image> <pubkey>

- Locally built boot image is signed with the default key.
$ openssl x509 -pubkey -noout -in build/target/product/security/verity.x509.pem > pubkey.pem
$ verify_boot_signature $OUT/boot.img pubkey.pem; echo $?
Signature is VALID
0

- Signed boot image should be verified with the OEM pubkey.
$ verify_boot_signature boot.img bullhead_pub.pem; echo $?
Signature is VALID
0

- Locally built boot image can be verified with its embedded certificate
  but not with the OEM pubkey. This will lead to the YELLOW boot state.
$ verify_boot_signature $OUT/boot.img; echo $?
Signature is VALID
0

$ verify_boot_signature $OUT/boot.img bullhead_pub.pem; echo $?
<...>
1

Bug: 32173582
Test: See above.

Change-Id: I11043eb796ccd128885e7412e65981cbd0183fb2

7 years agosimpleperf: add functions to IOEventLoop.
Yabin Cui [Wed, 19 Oct 2016 18:04:56 +0000 (11:04 -0700)]
simpleperf: add functions to IOEventLoop.

Support Write Event, and add functions to disable/enable Events.

Bug: http://b/30974760
Test: run simpleperf_unit_test.
Change-Id: I563738196fe5849d8cc3bee120707fd14076faa8

7 years agoMerge "simpleperf: copy document from ndk-master."
Treehugger Robot [Tue, 18 Oct 2016 21:13:06 +0000 (21:13 +0000)]
Merge "simpleperf: copy document from ndk-master."

7 years agosimpleperf: copy document from ndk-master.
Yabin Cui [Tue, 18 Oct 2016 19:26:26 +0000 (12:26 -0700)]
simpleperf: copy document from ndk-master.

Test: None, markdown only
Bug: None
Change-Id: I4d0ba07127f84119524df5d214c4731a7c9f06eb

7 years agobuild_verity_metadata: Support --signer_args argument.
Tao Bao [Mon, 17 Oct 2016 23:06:31 +0000 (16:06 -0700)]
build_verity_metadata: Support --signer_args argument.

Use argparse to parse input parameters for future extension.

Add 'build' and 'size' as two sub-commands.
- 'build_verity_metadata.py -s SIZE' becomes
  'build_verity_metadata.py size SIZE'.

- 'build_verity_metadata.py BLOCKS METADATA_IMAGE ...' becomes
  'build_verity_metadata.py build BLOCKS METADATA_IMAGE ...'.

The 'build' command now accepts an optional argument '--signer_args' to
specify signer specific arguments.

Bug: 31500665
Test: Building and signing work w/ and w/o --signer_args.

Change-Id: I3cfd2b584efad216b91d5fcd0314f4468ff7450f

7 years agoMerge changes from topic 'ext4_utils_header'
Tao Bao [Mon, 10 Oct 2016 20:07:32 +0000 (20:07 +0000)]
Merge changes from topic 'ext4_utils_header'

* changes:
  libfec: Update the header path for ext4_utils.
  ext4_utils: Export headers for libext4_utils* libs.

7 years agolibfec: Update the header path for ext4_utils.
Tao Bao [Thu, 6 Oct 2016 06:11:36 +0000 (23:11 -0700)]
libfec: Update the header path for ext4_utils.

Test: mmma system/extras/libfec

Change-Id: I28b71419019c3bb0873b159e178cdfcfb5d89922

7 years agoext4_utils: Export headers for libext4_utils* libs.
Tao Bao [Wed, 5 Oct 2016 19:44:18 +0000 (12:44 -0700)]
ext4_utils: Export headers for libext4_utils* libs.

So we can do "#include <ext4_utils/make_ext4fs.h>" without adding
"LOCAL_C_INCLUDES += system/extras/ext4_utils".

Also clean up the #include lines in system/extras/ext4_utils/.

Test: `m checkbuild` works.

Change-Id: I3c8b07c9b6f5996160e0cb6d9d069579b1609f60

7 years agoMerge "Rely on the platform -std default."
Treehugger Robot [Sun, 9 Oct 2016 00:00:53 +0000 (00:00 +0000)]
Merge "Rely on the platform -std default."

7 years agoRely on the platform -std default.
Elliott Hughes [Fri, 7 Oct 2016 22:19:02 +0000 (15:19 -0700)]
Rely on the platform -std default.

Bug: http://b/32019064
Test: builds
Change-Id: I301b223df84ffdea7c93b5c735c859abcc5bb220

7 years agoMerge "Fix ext4_util logging"
Treehugger Robot [Fri, 7 Oct 2016 03:08:51 +0000 (03:08 +0000)]
Merge "Fix ext4_util logging"

7 years agoFix ext4_util logging
Wei Wang [Thu, 6 Oct 2016 22:57:59 +0000 (15:57 -0700)]
Fix ext4_util logging

Init moved to base logging and current implementation will messed up the
init process logging

Bug: 31965943
Test: take the log after CL
Change-Id: I8823aa17d9dce082360261537d87ac15389d6ad8

7 years agoMerge "simpleperf: add perf counter into trace"
Treehugger Robot [Thu, 6 Oct 2016 19:32:37 +0000 (19:32 +0000)]
Merge "simpleperf: add perf counter into trace"

7 years agosimpleperf: add perf counter into trace
Wei Wang [Thu, 29 Sep 2016 23:34:15 +0000 (16:34 -0700)]
simpleperf: add perf counter into trace

Bug: http://b/31840600
Test: captured systrace with simpleperf stat
Change-Id: I14447d048ea8d059a377c6f0d7cfc10041a98693

7 years agoMerge "Test for _WIN32 in system/extras instead of USE_MINGW."
Treehugger Robot [Wed, 5 Oct 2016 20:56:57 +0000 (20:56 +0000)]
Merge "Test for _WIN32 in system/extras instead of USE_MINGW."

7 years agoTest for _WIN32 in system/extras instead of USE_MINGW.
Elliott Hughes [Wed, 5 Oct 2016 16:44:48 +0000 (09:44 -0700)]
Test for _WIN32 in system/extras instead of USE_MINGW.

Bug: http://b/23392815
Test: builds
Change-Id: Ide007c7ac8414a82548cc99fe384c7de9ba7494b

7 years agoMerge "Simpleperf: don't expose EventSelection."
Treehugger Robot [Wed, 5 Oct 2016 03:55:32 +0000 (03:55 +0000)]
Merge "Simpleperf: don't expose EventSelection."

7 years agoMerge "Include custom partitions in dumpcache tool"
Wei Wang [Tue, 4 Oct 2016 21:52:54 +0000 (21:52 +0000)]
Merge "Include custom partitions in dumpcache tool"

7 years agoMerge "Remove LOCAL_CTS_GTEST_LIST_EXECUTABLE"
Treehugger Robot [Sat, 1 Oct 2016 16:23:54 +0000 (16:23 +0000)]
Merge "Remove LOCAL_CTS_GTEST_LIST_EXECUTABLE"

7 years agoRemove LOCAL_CTS_GTEST_LIST_EXECUTABLE
Dan Willemsen [Fri, 30 Sep 2016 05:40:10 +0000 (22:40 -0700)]
Remove LOCAL_CTS_GTEST_LIST_EXECUTABLE

The one user has been removed, this is no longer necessary.

Test: None
Change-Id: I387bca94f5b8b719bd75154d996bf64a487a57be

7 years agoMerge "Revert "ext4_utils: -Werror""
Colin Cross [Fri, 30 Sep 2016 01:02:53 +0000 (01:02 +0000)]
Merge "Revert "ext4_utils: -Werror""

7 years agoRevert "ext4_utils: -Werror"
Colin Cross [Fri, 30 Sep 2016 01:01:50 +0000 (01:01 +0000)]
Revert "ext4_utils: -Werror"

This reverts commit f55303f4a4a4319e90e671b50a4dcdd131781f35.

Change-Id: I63b6c158536871534cfee9b3fbe416f121d7b75a

7 years agoMerge changes I8405c4fe,I52e6143d
Treehugger Robot [Fri, 30 Sep 2016 00:02:50 +0000 (00:02 +0000)]
Merge changes I8405c4fe,I52e6143d

* changes:
  perfprofd: build error
  ext4_utils: -Werror

7 years agoInclude custom partitions in dumpcache tool
Wei Wang [Mon, 26 Sep 2016 23:47:49 +0000 (16:47 -0700)]
Include custom partitions in dumpcache tool

Currently dumpcache use whitelist to include only standard partitions
and also print duplicated entries with symbolic link which makes the
total summary inaccurate.
This patch use blacklist "rootfs/devfs/tmpfs/procfs" to support more
partitions and skip symbolic links.

Test: manual - took a dumpcache
Bug: 31756965
Change-Id: I6038de9a2f3be11179cb30b4c4c6d2e7cd43aaa6

7 years agoMerge changes Ic93ac4e9,I68a85138
Treehugger Robot [Thu, 29 Sep 2016 23:06:05 +0000 (23:06 +0000)]
Merge changes Ic93ac4e9,I68a85138

* changes:
  qtaguid replace asprintf with libbase StringPrintf
  qtaguid: test: fix issue with buffer overflow

7 years agoMerge "simpleperf: add interval to stat print"
Treehugger Robot [Thu, 29 Sep 2016 22:55:47 +0000 (22:55 +0000)]
Merge "simpleperf: add interval to stat print"

7 years agoSimpleperf: don't expose EventSelection.
Yabin Cui [Thu, 29 Sep 2016 22:32:45 +0000 (15:32 -0700)]
Simpleperf: don't expose EventSelection.

And some tiny improvements.

Bug: http://b/30974760
Test: run simpleperf_unit_test.
Change-Id: Ie2d46c8ab9ee763d107527c9a54590f845569da4

7 years agosimpleperf: add interval to stat print
Wei Wang [Wed, 28 Sep 2016 21:42:02 +0000 (14:42 -0700)]
simpleperf: add interval to stat print

Add a stat interval printing

Bug: http://b/31806433
Test: simpleperf_unit_test --gtest_filter=stat_cmd.interval_option
Change-Id: Ia2881d990036cc099baccb8a2d8cd3828877a910
(cherry picked from commit e6d8a52400fe710b743ce57b89bd015ab219434b)

7 years agoperfprofd: build error
Mark Salyzyn [Thu, 29 Sep 2016 17:44:36 +0000 (10:44 -0700)]
perfprofd: build error

Must define LOG_TAG before including android/log.h

Test: build success
Bug: 26552300
Bug: 31289077
Change-Id: I8405c4fe21984aa1d339c6e7e452e70a43324c8b

7 years agoext4_utils: -Werror
Mark Salyzyn [Fri, 13 May 2016 21:28:32 +0000 (14:28 -0700)]
ext4_utils: -Werror

Correct a few compiler warnings

Test: build success
Bug: 26552300
Bug: 31289077
Change-Id: I52e6143df465c02b94fe89c80b1712706da1ab7c

7 years agoqtaguid replace asprintf with libbase StringPrintf
Chenbo Feng [Thu, 29 Sep 2016 00:03:31 +0000 (17:03 -0700)]
qtaguid replace asprintf with libbase StringPrintf

use libbase function android::base::StringPrintf for string
manipulation. Avoid free the char array at the end. Changed the program
logic of building the match template to make it more concise.

Test: manually tested on angler device. build and sync this module into
device and run adb shell ./data/nativetest64/socketTag/socketTag

Change-Id: Ic93ac4e91e87337acb2e12efadeb57833c36c95e

7 years agoqtaguid: test: fix issue with buffer overflow
Chenbo Feng [Wed, 28 Sep 2016 17:01:42 +0000 (10:01 -0700)]
qtaguid: test: fix issue with buffer overflow

Fixed the bug that test program cannot read socket addr directly from
ctrl file, changed the implementation of read ctrl file to prevent
possible fails when the ctrl file size is greater then the read buffer
size.

Test: manually tested on angler device. build and sync this module into
device and run adb shell ./data/nativetest64/socketTag/socketTag

Change-Id: I68a8513814a97d9417e13ad320a079510591d3a2

7 years agoMerge "Add missing liblog dependency"
Dimitry Ivanov [Wed, 28 Sep 2016 18:56:07 +0000 (18:56 +0000)]
Merge "Add missing liblog dependency"

7 years agoAdd missing liblog dependency
Dimitry Ivanov [Tue, 27 Sep 2016 16:22:50 +0000 (09:22 -0700)]
Add missing liblog dependency

Bug: http://b/31289077
Bug: http://b/27171986
Test: remove liblog from libcutils and recompile
Change-Id: Ibf5b6a978a424107ad1364e35c9bb856d8bde92f

7 years agoMerge "Stop coalescing kernel processes to the same name, other changes."
Than McIntosh [Tue, 27 Sep 2016 02:18:56 +0000 (02:18 +0000)]
Merge "Stop coalescing kernel processes to the same name, other changes."

7 years agoStop coalescing kernel processes to the same name, other changes.
Alexey Alexandrov [Sun, 25 Sep 2016 00:05:28 +0000 (17:05 -0700)]
Stop coalescing kernel processes to the same name, other changes.

* Do not coalesce kernel processes to the same name as knowing the
  breakdown of kernel cycles by the name of kernel or user process is
  useful.
* Make the perfprofd tests run well in 64-bit mode.
* Add debugging "-x PATH" flag to perfprofd which can be used to convert
  the given perf data file to the encoded proto format and immediately
  exit.

Test: 32-bit and 64-bit perfprofd_test on the device
Change-Id: Iec35190db995243eed253045605f8807bc0bddee

7 years agoMerge "Add missing include."
Treehugger Robot [Wed, 21 Sep 2016 22:46:04 +0000 (22:46 +0000)]
Merge "Add missing include."

7 years agoAdd missing include.
Dan Albert [Wed, 21 Sep 2016 21:06:39 +0000 (14:06 -0700)]
Add missing include.

Test: mm
Bug: None
Change-Id: Iffdcdc12aa95b090e26afbbacb22d91e4fdd52ea

7 years agoMerge "avb: move to external/avb."
David Zeuthen [Fri, 16 Sep 2016 22:35:50 +0000 (22:35 +0000)]
Merge "avb: move to external/avb."

7 years agoMerge "simpleperf: calculate perf clock based on system clock."
Treehugger Robot [Fri, 16 Sep 2016 21:27:39 +0000 (21:27 +0000)]
Merge "simpleperf: calculate perf clock based on system clock."

7 years agoavb: move to external/avb.
David Zeuthen [Fri, 16 Sep 2016 20:21:13 +0000 (16:21 -0400)]
avb: move to external/avb.

This code is now in external/avb so remove it here.

BUG=31508897
TEST=Build succeeds.

Change-Id: I5d934918885e979a4615745890a05f75732ba027

7 years agosimpleperf: calculate perf clock based on system clock.
Yabin Cui [Thu, 15 Sep 2016 17:43:20 +0000 (10:43 -0700)]
simpleperf: calculate perf clock based on system clock.

The timestamps of perf event records are not generated
by MONOTONIC system clock. However, we can calculate
perf clock based on MONOTONIC system clock.
See http://www.gossamer-threads.com/lists/linux/kernel/1970811

Bug: http://b/30975131
Test: run `simpleperf record -a --log verbose ls` and check the result.
Change-Id: I78ef28b501aa45a4696c05ec76f6d04363082c5d

7 years agoMerge "libpagemap: add static library for pagemap"
Treehugger Robot [Thu, 15 Sep 2016 23:37:06 +0000 (23:37 +0000)]
Merge "libpagemap: add static library for pagemap"

7 years agolibpagemap: add static library for pagemap
Dimitry Ivanov [Thu, 15 Sep 2016 22:01:59 +0000 (15:01 -0700)]
libpagemap: add static library for pagemap

Bionic unit/cts tests need use static version of libpagemap
to avoid depending on internal android library.

Test: mm && run pagemap_static_test
Bug: http://b/22182538
Change-Id: Ic8b4e74565f77a71540e8cb2c7f9dc67f8d5e10c

7 years agoMerge "avb: Add support for sparse image files."
David Zeuthen [Tue, 6 Sep 2016 17:53:48 +0000 (17:53 +0000)]
Merge "avb: Add support for sparse image files."

7 years agoMerge "Use android::base::GetExecutablePath in simpleperf."
Treehugger Robot [Sat, 3 Sep 2016 03:06:05 +0000 (03:06 +0000)]
Merge "Use android::base::GetExecutablePath in simpleperf."

7 years agoUse android::base::GetExecutablePath in simpleperf.
Elliott Hughes [Fri, 2 Sep 2016 20:26:14 +0000 (13:26 -0700)]
Use android::base::GetExecutablePath in simpleperf.

Bug: http://b/30988271
Change-Id: Ide5f1696834cfa1081e86131e24499bd15131cd6

7 years agoMerge "fec: add --padding"
Treehugger Robot [Fri, 2 Sep 2016 18:13:32 +0000 (18:13 +0000)]
Merge "fec: add --padding"

7 years agoMerge "libfec: allow fec_header to be located anywhere"
Treehugger Robot [Fri, 2 Sep 2016 18:13:32 +0000 (18:13 +0000)]
Merge "libfec: allow fec_header to be located anywhere"

7 years agoMerge "simpleperf: handle monitored processes correctly when a cpu is up."
Yabin Cui [Fri, 2 Sep 2016 17:18:15 +0000 (17:18 +0000)]
Merge "simpleperf: handle monitored processes correctly when a cpu is up."

7 years agoavb: Add support for sparse image files.
David Zeuthen [Mon, 22 Aug 2016 19:20:43 +0000 (15:20 -0400)]
avb: Add support for sparse image files.

By default the build system uses sparse images for system.img so support
this in avbtool. Part of this code is derived from simg_dump.py in
system/core/libsparse.

BUG=31263798
TEST=New unit tests and unit tests pass.

Change-Id: Iace73c994102a51c59e82ce208ee8438155c50e1

7 years agolibfec: allow fec_header to be located anywhere
Sami Tolvanen [Thu, 1 Sep 2016 22:51:12 +0000 (15:51 -0700)]
libfec: allow fec_header to be located anywhere

Don't require fec_header to be immediately after ECC data.

Bug: 28865197
Change-Id: Ie8faeeb07c35e2593553f7678762aae7f14c2ff7

7 years agoMerge changes Ic9258141,If4b32546
Treehugger Robot [Thu, 1 Sep 2016 22:47:01 +0000 (22:47 +0000)]
Merge changes Ic9258141,If4b32546

* changes:
  fec: remove unneeded target executable
  fec: remove unused mmap code