Commit graph

11424 commits

Author SHA1 Message Date
Elliott Hughes
bf7560f12c Merge "Further refactoring of the bootchart code." 2015-02-13 23:54:29 +00:00
Elliott Hughes
841b263fae Further refactoring of the bootchart code.
Change-Id: Ifed6ae8d481b605139fd27799574de4c2d0f5908
2015-02-13 15:15:11 -08:00
Elliott Hughes
265df6f50c Merge "bootchart: fix bootchart can not be triggered problem" 2015-02-12 20:17:50 +00:00
Yongqin Liu
a197ff12dd bootchart: fix bootchart can not be triggered problem
bootchart uses a file on the data partition to decide if it should collect
data for bootchart, but the data partition will be mounted by the mount_all
command in the "on fs" section, and it will be only added into the action
queue when command "trigger fs" is executed, but that's after the
bootchart_init action (late_init).

This change makes bootchart_init a builtin command of init,
and make it executed as the first command of "on post-fs" section
which will be triggered after the "on fs" section.

This change also refactors the bootchart code to all be in bootchart.cpp.

Change-Id: Ia74aa34ca5b785f51fcffdd383075a549b2a99d9
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
2015-02-12 12:13:24 -08:00
Christopher Ferris
884f194255 Merge "Do not dump maps/memory/code of sibling threads." 2015-02-11 01:19:56 +00:00
Mark Salyzyn
05a67c964b Merge "liblog: test: ARM64: Enable 32 and 64-bit liblog_benchmark" 2015-02-10 18:16:05 +00:00
Mark Salyzyn
53016d8949 liblog: test: ARM64: Enable 32 and 64-bit liblog_benchmark
- Enable build for 32 and 64 bit benchmark executables
- Fix some cosmetics issues in logd_write.c

Change-Id: I544446e5116607d7fec89171135f6e1eff6aebd8
2015-02-10 18:15:51 +00:00
Narayan Kamath
0d385d1c62 Merge "Track renaming of initUnchangeableSystemProperty." 2015-02-10 15:43:54 +00:00
Narayan Kamath
484c55b37f Track renaming of initUnchangeableSystemProperty.
It's now setUnchangeableSystemProperty.

Change-Id: Ib42f8ac9f074230dfb7af2eb633e0a536ab7d4b7
2015-02-10 15:43:41 +00:00
Christopher Ferris
ab9e7dcef6 Do not dump maps/memory/code of sibling threads.
Modifies the code so that if the unwind fails, the code still prints
as much data as possible.

Also, for sibling threads, skip printing the maps and memory/code
since it's not likely to be very relevant.

Fix a few cases where extra space is at the end of lines.

Fix an inverted if statement that was checking the wrong condition.

Bug: 18816322
Change-Id: Ic659e0c34489bf2c65c5a23e2b83e31653b927e4
2015-02-09 19:22:33 -08:00
Andreas Gampe
ed318bff41 Merge "log.h: Fix typo" 2015-02-10 00:17:42 +00:00
Andreas Gampe
f45bbe496f log.h: Fix typo
Change-Id: I6b5e9bc9d40e5e5ecf9f50f7392675391e6f18e6
2015-02-09 16:13:33 -08:00
Mark Salyzyn
fd86730386 Merge changes I420b5b8a,Ica23fe41
* changes:
  log.h: wrap android_testLog around __android_log_is_loggable
  log.h: deprecate CONDITION
2015-02-09 23:59:11 +00:00
Mark Salyzyn
1df92e523e log.h: wrap android_testLog around __android_log_is_loggable
- take android_testLog from the bonepile and resurrect
- android_testLog is used, and makes sense in its current context
  as a holder for Android Logging policy.
- Default level when not specified is ANDROID_LOG_VERBOSE for
  eng and userdebug, and ANDROID_LOG_DEBUG for user.

NB: Properties, which are associated with __android_log_is_loggable are
not to be adjusted in user release; it would be useful at that juncture to
return a constant of (0) for VERBOSE, and a (1) for others on user builds.
Or default level to drop to ANDROID_LOG_DEBUG for all in future.

Bug: 17760225
Change-Id: I420b5b8a94d53d664c6a8b13546ebc424a147923
2015-02-09 15:37:32 -08:00
Mark Salyzyn
f5af82edf3 log.h: deprecate CONDITION
- replace CONDITION with __predict_false to match with bionic

Change-Id: Ica23fe41cf9a7ea5eaf1b8552780af9ec7827808
2015-02-09 15:25:48 -08:00
Elliott Hughes
830914a4b6 Merge "Lose touch to toybox." 2015-02-09 22:15:39 +00:00
Mark Salyzyn
95f7ecbd38 Merge "liblog: add __android_log_is_loggable()" 2015-02-09 22:13:47 +00:00
Mark Salyzyn
956870518e liblog: add __android_log_is_loggable()
- Add new liblog API __android_log_is_loggable(prio, tag, def)
- future plan to integrate this into the runtime checks and into
  the logd daemon for filtration. Inert for now.

Bug: 17760225
Change-Id: I16395b4d42acc08f0209f55a1cbf87b0b2112898
2015-02-09 22:12:59 +00:00
Elliott Hughes
c6fa276515 Lose touch to toybox.
Change-Id: Id9646ff10870425fc4013aab6621a5f6a0c6e98e
2015-02-09 14:10:44 -08:00
Elliott Hughes
3bc8ae63ce Merge "Use mkstemp for host ashmem." 2015-02-09 21:53:13 +00:00
Elliott Hughes
2004a863dc Use mkstemp for host ashmem.
Bug: 19310167
Change-Id: Ic4e32b3924a9aa0b0d095d445108cbcf2231cd91
2015-02-09 12:49:53 -08:00
Elliott Hughes
3f27558e29 Merge "fix bug that passing invalid fd to fstats on win32 builds" 2015-02-09 19:50:01 +00:00
eric.yan
a859219fec fix bug that passing invalid fd to fstats on win32 builds
lfd returned by adb_open is not the actual file desc.
on win32 builds. calling through fstat with invalid fd
will lead to crash, using stat instead.

Change-Id: I7fdc8b825162eaa42efe8755265842c300b00e39
Signed-off-by: eric.yan <eric.yan@yulong.com>
Signed-off-by: severecold <severecold@gmail.com>
2015-02-09 13:41:27 +00:00
Elliott Hughes
5ac8b917de Merge "Bump do_write buffer size" 2015-02-07 17:07:01 +00:00
Johan Redestig
7e952f41f1 Bump do_write buffer size
In the case of do_write (write to generic file) there
is really no relation to the PROP_VALUE_MAX limitation
of system properties. The current value, 92, is not so
much for writing to files so bump it a bit.

Ideally there should not be any low hard limit in this
case. Either expand_props should allocate the output
buffer or take the output fd and to streaming write.
Such a change is rather invasive though and at this
point in time it seems reasonable that one dont want
more than 256 character strings in the init files.

Change-Id: I846a282ae4e747e6171eef38b302b46287951451
2015-02-07 10:57:10 +01:00
Christopher Ferris
c9c401e64b Merge "Move map data into backtrace data proper." 2015-02-06 23:29:00 +00:00
Christopher Ferris
12385e3ad0 Move map data into backtrace data proper.
The backtrace structure used to include a pointer to a backtrace_map_t
that represented the map data for a particular pc. This introduced a
race condition where the pointer could be discarded, but the backtrace
structure still contained a pointer to garbage memory. Now all of the map
information is right in the structure.

Bug: 19028453
Change-Id: If7088a73f3c6bf1f3bc8cdd2bb4b62e7cab831c0
2015-02-06 15:00:09 -08:00
Elliott Hughes
5e753100c3 Merge "Clean up reading and writing in init." 2015-02-06 22:22:30 +00:00
Elliott Hughes
f682b4786a Clean up reading and writing in init.
This isn't particularly useful in and of itself, but it does introduce the
first (trivial) unit test, improves the documentation (including details
about how to debug init crashes), and made me aware of how unpleasant the
existing parser is.

I also fixed a bug in passing --- unless you thought the "peboot" and "pm"
commands were features...

Bug: 19217569
Change-Id: I6ab76129a543ce3ed3dab52ef2c638009874c3de
2015-02-06 14:20:30 -08:00
Nick Kralevich
17b5b35200 Merge "fs_mgr: error check umount calls / add retry logic" 2015-02-06 20:27:12 +00:00
Nick Kralevich
7294eb6cae fs_mgr: error check umount calls / add retry logic
Don't silently ignore umount errors. At a minimum, log them.

Add strerror(errno) to another umount call, to make sure we get
some actionable data.

check_fs: try 5 times umounting the filesystem. It appears that
the umount is failing, perhaps because some service is opening
the file on the device or other error. Try unmounting it multiple
times in case it's a transient problem and we can recover.

Bug: 19199624
Bug: 19156134
Change-Id: I7213eb52d55116fb2419a36494d26d5e159981a7
2015-02-05 20:50:22 -08:00
Christopher Ferris
6289412222 Merge "Remove link to gccdemangle." 2015-02-06 04:11:47 +00:00
Christopher Ferris
2a176a89c2 Remove link to gccdemangle.
Bug: 18930951
Change-Id: Ib7fd332b6e02241c0676ef33d2fa210a72efe1b1
2015-02-05 19:33:11 -08:00
Greg Hackmann
f52338fe1e Merge "rootdir: enable armv8_deprecated swp hook" 2015-02-05 23:09:14 +00:00
Greg Hackmann
cee8757f92 rootdir: enable armv8_deprecated swp hook
The upstream kernel now includes support for emulating legacy AArch32
instructions on ARMv8 devices.  By default this framework emulates
deprecated instructions but not obsolete instructions.

Android requires support for the obsolete SWP and SWPB instructions on
all ARM devices, so override this default for the swp emulation hook.

Change-Id: I82b9bdb564413ec7c1a101da75a9928aebe1606b
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2015-02-05 13:38:58 -08:00
Elliott Hughes
d558530ba9 Merge "Fix Windows build." 2015-02-05 16:23:41 +00:00
Elliott Hughes
d79801d60d Fix Windows build.
Take 2. Probably should have done this in the beginning, but thought I was
being clever.

Change-Id: I85c6e487eece9bcc75f8f62c850c2d4d1ee9e908
2015-02-05 08:21:37 -08:00
Elliott Hughes
6c3ff4fe7f Merge "Fix Windows build." 2015-02-05 03:40:07 +00:00
Elliott Hughes
31fa09c1c6 Fix Windows build.
Only two days in, and I'm already really regretting putting this code
somewhere that builds for Mac OS and Windows...

Change-Id: I576ee4a9e647e10dc2d47c7e1e38aedee2bf404c
2015-02-04 19:38:28 -08:00
Elliott Hughes
051f369a14 Merge "Build BSD grep separately from toolbox." 2015-02-05 03:36:07 +00:00
Elliott Hughes
d20218e05d Build BSD grep separately from toolbox.
Also move the dd-only library code into the dd section (so a future
maintainer will know to keep/remove them as a block) and fix the one
build warning remaining.

Change-Id: Ibf6b28ef05e4cbb70b9308b0f4387f5af5b7fa94
2015-02-04 18:50:14 -08:00
Elliott Hughes
1dee489cea Merge "Stop using #if for conditional compilation." 2015-02-05 01:16:29 +00:00
Elliott Hughes
c0e919c920 Stop using #if for conditional compilation.
Use regular 'if' to prevent bitrot.

Also remove remaining typedefs.

Change-Id: I2e6ca928e2db29b88b643cf990ff05cfb0be94a6
2015-02-04 17:16:11 -08:00
Elliott Hughes
27d28d3baf Merge "Add a WriteStringToFile overload that cares about permissions." 2015-02-04 22:43:02 +00:00
Elliott Hughes
202f024dee Add a WriteStringToFile overload that cares about permissions.
Change-Id: I857a80b61768d4e9610bdd149eff2d9d8e48d2c0
2015-02-04 14:30:23 -08:00
Elliott Hughes
aec43a12a7 Merge "Use TEMP_FAILURE_RETRY, always build bootchart.cpp." 2015-02-04 18:37:32 +00:00
Elliott Hughes
24627906bf Use TEMP_FAILURE_RETRY, always build bootchart.cpp.
Also switch the revision parsing over to sscanf as promised. I haven't
done the hardware parsing because I don't yet know whether we actually need
to keep the space-stripping code.

Change-Id: Ic33378345cd515cb08d00c543acf44eb72673396
2015-02-04 10:25:09 -08:00
Elliott Hughes
798219e9e9 Merge "Fix clang "ueventd.cpp:111:1: error: no return statement in function returning non-void"." 2015-02-04 18:20:33 +00:00
Elliott Hughes
2145779c87 Fix clang "ueventd.cpp:111:1: error: no return statement in function returning non-void".
Change-Id: I69c9e5534975bffa0fbf98ca4af50400f6b94aa0
2015-02-04 10:19:50 -08:00
Elliott Hughes
e939e70401 Merge "Build init as C++." 2015-02-04 17:17:25 +00:00