Commit graph

14020 commits

Author SHA1 Message Date
Elliott Hughes
c5d278d48e Merge "metricsd: Remove unused constant." 2015-09-03 04:13:27 +00:00
Bertrand SIMONNET
73f4355433 metricsd: Remove unused constant.
Change-Id: Id151c4a7a091ee9cb07fa7c6188d162cf342d70e
2015-09-02 20:49:38 -07:00
Yabin Cui
7a3f8d6691 adb: clean up debug tracing a little.
Always use LOG() for debug tracing.
Remove useless D_lock. I believe it is useless to lock just before and after fprintf.

I verified the log output both on host and on device. The output looks fine to me.

Change-Id: I96ccfe408ff56864361551afe9ad464d197ae104
2015-09-02 20:21:00 -07:00
Dan Willemsen
bfe322285f Merge "Remove USE_MINGW/CYGWIN; Whitelist windows modules" 2015-09-03 00:32:09 +00:00
Jorge Lucangeli Obes
e920c46e7d Use CAP_MASK_LONG for file capabilities.
Extract the |1ULL << $CAP_NAME| construct to a macro, to avoid
repeating it.

Change-Id: I9312c27130d7e6c5b6ab3b4cc5c70a6b98378b98
2015-09-02 17:18:44 -07:00
Dan Willemsen
87a419c8b1 Remove USE_MINGW/CYGWIN; Whitelist windows modules
CYGWIN is not supported, USE_MINGW and HOST_OS==windows are being
replaced with LOCAL_..._windows variables.

Bug: 23566667
Change-Id: I3e4a1e4097dc994cf5abdce6939e83a91758fd75
2015-09-02 17:10:35 -07:00
Bertrand SIMONNET
8835c5b56e metricsd: Log the histogram name to hash mapping.
When running the metrics_daemon in verbose mode, log the histogram name
along with the hash name.
This is useful when debugging as the protobuf message only contains the
hash of the name.

Change-Id: Ifea7edce55d62d30994ec7b75bb8728f6a0c40e8
2015-09-02 15:07:10 -07:00
Bertrand SIMONNET
90b02cd46d metricsd: Collect generic stats about the system.
Collect memory usage and disk IO statistics periodically.

BUG: 22953719

Change-Id: I2e35d4800ddc684284969e6a58a6f50497086b69
2015-09-02 15:04:26 -07:00
Steve Fung
03bbd64aa9 Merge "crash_reporter: Call dbus-send using chromeos::ProcessImpl" 2015-09-02 21:33:29 +00:00
Bertrand Simonnet
ad55064594 Merge "metricsd: Fix style issues." 2015-09-02 21:28:11 +00:00
Bertrand Simonnet
74f6f8c323 Merge "metricsd: Make the unit tests pass." 2015-09-02 21:26:40 +00:00
Bertrand SIMONNET
675a10c3d9 metricsd: Fix style issues.
This CL:
* removes dead code.
* converts constants static fields into proper constants.
* converts to C++/libchrome some of the parsing logic.

BUG: 22953719

Change-Id: Ief01178c6c268f8ae3690ad9deef42cfb43b2b75
2015-09-02 13:30:54 -07:00
Bertrand SIMONNET
1253186728 metricsd: Make the unit tests pass.
This cleans up the unit tests and update them to pass.

Cleaned up:
* removed the irrelevant bits.
* Used ScopedTempDir for all test specific files (instead of the current
  directory).
* Update some objects to make them more easily testable.
* Group all the test in a single binary and use bionic's test runner.

BUG: 23682444
Change-Id: I289e3a5ff89968fdecd4a156e93bc38bbc25f58b
2015-09-02 13:30:48 -07:00
Steve Fung
6e68dd72c7 crash_reporter: Call dbus-send using chromeos::ProcessImpl
Convert the call to dbus-send from system() to chromeos::ProcessImpl
so that the shell_exec selinux policy can be removed.

Bug: 23280203
Change-Id: I692ebecf5b7f0611de252225cedabcdefd56dff8
2015-09-02 12:29:22 -07:00
Tom Cherry
4aa9dbab6f Merge "init: Update readme.txt to reflect recent changes to init." 2015-09-02 19:28:00 +00:00
Yasuhiro Matsuda
7b0bdec4b2 Merge "Add a tag for tracing system server." 2015-09-02 12:54:23 +00:00
Tom Cherry
3be66edc59 init: Update readme.txt to reflect recent changes to init.
Updates are as follows:

A detailed explanation of event triggers and property triggers
including how they can now be used

A new section describing .rc files, their locations, and the
intentions for each of these locations

A new section describing the import keyword and how it is not a
command but rather its own section

Removal of deprecated or incorrect text

Change-Id: If0a37375ac92a857900f3303ada4ba742360daff
2015-09-01 15:32:33 -07:00
Elliott Hughes
5d80400605 Merge "adb/base win32 tests: fix comment and open() flags" 2015-09-01 22:03:41 +00:00
Spencer Low
2fbeb0cc71 adb/base win32 tests: fix comment and open() flags
Match base's use of O_BINARY.

Change-Id: I930b5c8fddde20966580069f2e681b99cb26f1a3
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
2015-09-01 14:57:58 -07:00
Tom Cherry
54c70ca156 Merge "init: Use classes for parsing and clean up memory allocations" 2015-09-01 21:35:45 +00:00
Elliott Hughes
78ea165ea2 Merge "Use O_BINARY in base/file for Windows." 2015-09-01 21:13:33 +00:00
Elliott Hughes
470d79a09c Use O_BINARY in base/file for Windows.
This matches the behavior of the google3/Chrome APIs. It's probably what you
want in all cases except where you plan on calling Split(content, "\n"), but
we should probably have something like simpleperf's LineReader for that
anyway.

Change-Id: I1a128ed8c328bc95b0b2ef4068a65a8562721418
2015-09-01 13:35:44 -07:00
Tom Cherry
b7349902a9 init: Use classes for parsing and clean up memory allocations
Create a Parser class that uses multiple SectionParser interfaces to
handle parsing the different sections of an init rc.

Create an ActionParser and ServiceParser that implement SectionParser
and parse the sections corresponding to Action and Service
classes.

Remove the legacy keyword structure and replace it with std::map's
that map keyword -> (minimum args, maximum args, function pointer) for
Commands and Service Options.

Create an ImportParser that implements SectionParser and handles the
import 'section'.

Clean up the unsafe memory handling of the Action class by using
std::unique_ptr.

Change-Id: Ic5ea5510cb956dbc3f78745a35096ca7d6da7085
2015-09-01 12:26:02 -07:00
Daniel Rosenberg
7c4ed6af79 Merge "fs_mgr: Add support for A/B partitions" 2015-09-01 19:24:09 +00:00
Yabin Cui
2ae47a0b54 Merge "adb: add unit test for fdevent." 2015-08-31 22:40:04 +00:00
Daniel Rosenberg
8bb2f36abd fs_mgr: Add support for A/B partitions
Allow partitions to be marked as A/B partitions
using the slotselect flag in fstab. The partitions
can be identified by appending the correct suffix
to the block device listed in the fstab. The suffix
is provided by the bootloader through a command line
parameter or the device tree, and can be found in
ro.boot.slot_suffix or read from the boot_control HAL.

Change-Id: I6846d80e857f95bfb8f282f4ab81167394613bbe
Signed-off-by: Daniel Rosenberg <drosen@google.com>
2015-08-31 15:18:05 -07:00
Yabin Cui
1e19317e57 Merge "adb: improve names for transport threads." 2015-08-31 21:21:21 +00:00
Mark Salyzyn
6bb48f07db Merge "logd: worst uid record watermark part three" 2015-08-31 20:52:29 +00:00
Mark Salyzyn
ccfe8446a1 logd: worst uid record watermark part three
Regression that cause records to be preserved for more than a day.

Bug: 23681639
Bug: 23685592
Change-Id: I5e4393c8e3ed935790994c77ec51dc6512a6daa6
2015-08-31 20:51:42 +00:00
Yabin Cui
1531cee658 Merge "adb: remove workaround for b/6558362." 2015-08-31 20:35:45 +00:00
Yabin Cui
d6ab3c2245 adb: improve names for transport threads.
The old names seems confusing. output_thread was reading remote data and writing to
local sockets. input_thread was reading local sockets data and writing to remote.
This change tries to make it clear by renaming output_thread to read_transport thread,
and renaming input_thread to write_transport thread.

Change-Id: I2e7b4cde7a94d436f3745e9e3ab10780e7caa8ac
2015-08-31 13:34:27 -07:00
Elliott Hughes
e66be4dd76 Lose ls to toybox.
Bug: http://b/23040458
Change-Id: I0e9f89b1169df409a38a2134ac2cb9edd0421be3
2015-08-31 12:45:47 -07:00
Yabin Cui
c6424585a2 adb: remove workaround for b/6558362.
I believe the problem has been fixed in https://android-review.googlesource.com/#/c/168412/.
So it's time to remove the workaround.

Bug: 6558362
Change-Id: I399c18eda0693f3c51feac07ff59a0a4b5558128
2015-08-31 12:10:11 -07:00
Elliott Hughes
1498261fc5 Merge "Lose uptime to toybox." 2015-08-31 18:48:31 +00:00
Elliott Hughes
b6bfd36c19 Merge "Distinguish transport threads." 2015-08-31 18:00:44 +00:00
Elliott Hughes
0c3914a44d Distinguish transport threads.
Use "<-" and "->" to work around Linux's very short thread name limit.

Bug: http://b/23423333
Change-Id: I9f3f096415b47162dacb660cd0a97ac7ff6107e6
2015-08-31 10:46:05 -07:00
Siva Velusamy
c9525ec366 Merge "adb: set thread names (linux & mac)" 2015-08-31 17:37:31 +00:00
Siva Velusamy
49ee7cf9a1 adb: set thread names (linux & mac)
Bug: 23423333
Change-Id: I0069f32ddbae2a10fb130064f721facf45b2cc09
2015-08-31 07:52:52 -07:00
Yabin Cui
bec02fc43d adb: add unit test for fdevent.
Change-Id: Ic26cda5d8e84425bc60ce36bc686bb6917c4ca3c
2015-08-28 21:33:22 -07:00
Elliott Hughes
9f07f87908 Merge "fatal and fatal_errno should be noreturn." 2015-08-29 02:22:18 +00:00
Yabin Cui
a3bdc6aba2 Merge "adb: clean up transport disconnect operations." 2015-08-29 02:21:46 +00:00
Elliott Hughes
2f3342fa33 fatal and fatal_errno should be noreturn.
Change-Id: I9c5d9cb5ed743d13e65112a111cc9544ec5da339
2015-08-28 19:13:10 -07:00
Yabin Cui
b329824e6c adb: clean up transport disconnect operations.
Move operations from global functions into member functions.
Add unit test.

Change-Id: Id4543d8e78541eb08c8e629f180c605c699737ec
2015-08-28 16:36:00 -07:00
Elliott Hughes
f6224587e5 Merge "Improve adb tracing." 2015-08-28 21:56:46 +00:00
Elliott Hughes
bd4b1fa4a9 Improve adb tracing.
The existing format was unreadable; putting the pid and tid first helps
somewhat. Also remove the unused qemu tracing which wasn't called anywhere.

Change-Id: I37ef3c556fe17b237ba1d8ca3216e2155ce5d0de
2015-08-28 14:46:33 -07:00
Yabin Cui
88a51cd4d8 Merge "adb: call run_transport_disconnects() only once." 2015-08-28 20:50:07 +00:00
Elliott Hughes
e73a8a2388 Merge "win32: adb start-server shows stdout/stderr output from actual server" 2015-08-28 20:13:40 +00:00
Elliott Hughes
a54f14eb95 Merge "adb unittest: get test_unicode_paths passing on win32" 2015-08-28 20:00:53 +00:00
Elliott Hughes
1d9253f255 Merge "adb: fix adb install and adb push exit code, error handling, unittest" 2015-08-28 19:46:46 +00:00
Yabin Cui
7b6fa7ed30 Merge "adb: remove adisconnect in aremotesocket." 2015-08-28 18:50:31 +00:00