Commit graph

21 commits

Author SHA1 Message Date
Mark Salyzyn
30f991f251 liblog: use log/log.h when utilizing ALOG macros
Test: compile
Bug: 30465923
Change-Id: Id6d76510819ebd88c3f5003d00d73a0dbe85e943
2017-01-11 09:31:15 -08:00
Mark Salyzyn
cfd5b080af system/core: preparation to pull back interfaces from android/log.h
Point to log/log.h where necessary, define LOG_TAG where necessary.
Accept that private/android_logger.h is suitable replacement for
log/logger.h and android/log.h.

Correct liblog/README

Effectively a cleanup and controlled select revert of
'system/core: drop or replace log/logger.h' and
'system/core: Replace log/log.h with android/log.h'.

Test: compile
Bug: 30465923
Change-Id: Ic2ad157bad6f5efe2c6af293a73bb753300b17a2
2016-10-20 08:11:39 -07:00
Mark Salyzyn
ff2dcd9af9 system/core Replace log/log.h with android/log.h
Should use android/log.h instead of log/log.h as a good example
to all others.  Adjust header order to comply with Android Coding
standards.

Test: Compile
Bug: 26552300
Bug: 31289077
Change-Id: I33a8fb4e754d2dc4754d335660c450e0a67190fc
2016-09-30 12:47:05 -07:00
Christopher Ferris
3a14004c7f Fix race condition updating local map data.
If the underlying local map changes, it's possible for multiple
threads to try and modify the map data associated with the UnwindLocalMap
object. Add a lock when generating the local map to avoid this problem.

In addition, add a read lock whenever any caller gets the maps iterator.
Updated all iterator callers to make this lock.

Bug: 29387050
Change-Id: Ie34822c3d8fd3bdb3dd126aeeb399969c36508c1
2016-06-16 23:28:11 -07:00
Chih-Hung Hsieh
ec2ff8c176 Fix google-runtime-int warnings.
Bug: 28220065
Change-Id: I6b8e121ddf98355d1c1ac034c2e3522b2b49e14b
2016-04-18 14:45:46 -07:00
Elliott Hughes
9ea0ff343f Merge "Clean up maps parsing in libbacktrace." 2015-09-23 05:35:05 +00:00
Elliott Hughes
fe3593dc2a Clean up maps parsing in libbacktrace.
(This might want to be unified with the very similar code in bionic, but
that's a job for another day.)

Change-Id: I5dade498f781305fa9909ee01f1f4bebc537c169
2015-09-22 17:26:24 -07:00
Yabin Cui
9e402bb20c Revert "Revert "Revert "Revert "Add BacktraceOffline for offline backtracing.""""
This reverts commit 94ece83270.

Change-Id: Ie06465c89a5fc115517130f9f2904cc855973155
2015-09-22 04:46:57 +00:00
Yabin Cui
94ece83270 Revert "Revert "Revert "Add BacktraceOffline for offline backtracing."""
This reverts commit 0a411c934a.

Change-Id: Ic1824afac6c32f1087b66de9d6368a561f235d13
2015-09-22 01:38:17 +00:00
Yabin Cui
0a411c934a Revert "Revert "Add BacktraceOffline for offline backtracing.""
This reverts commit ab5e583327.

And statically link llvm libraries on host to remove dependency
on 32-bit llvm shared library which is not included in the prebuilt.

Bug: 22229391

Change-Id: I8210687655ee1809fd820ab2a6ca5dfaf3f9096d
2015-09-21 12:54:45 -07:00
Yabin Cui
ab5e583327 Revert "Add BacktraceOffline for offline backtracing."
Using llvm makes libbacktrace stops building for 32 bit on linux host x86_64.

This reverts commit c9c6b6ee77.

Change-Id: Ieb807db881d7bb3132cd09e25fd08c28766ca0a8
2015-09-17 22:54:22 +00:00
Yabin Cui
c9c6b6ee77 Add BacktraceOffline for offline backtracing.
It is used by simpeleprf for stack unwinding.

Bug: 22229391
Change-Id: I26d698610ccdc9545da837bc5a8a9ec787f27a6b
2015-09-16 17:38:23 -07:00
Colin Cross
5b439eaf93 Fix unused argument error on darwin
Change-Id: Ie90f7f32b5bd1496bd663c969d729ea3f96d2588
2015-04-30 15:11:34 -07:00
Christopher Ferris
2c43cff01d Refactor the code.
The object hierarchy was confusing and convoluted. This removes
a lot of unnecessary code, and consolidates the BacktraceCurrent
and BacktraceThread code into BacktraceCurrent.

Change-Id: I01c8407d493712a48169df49dd3ff46db4a7c3ae
2015-03-31 10:51:44 -07: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
Brian Carlstrom
b978a329ef Add uncached argument to BacktraceMap::Create on darwin
Change-Id: I247a98fc3b98879a0c34a975f9914ccec95d1a04
2014-08-05 00:15:49 -07:00
Christopher Ferris
b8c72957f0 Change sprintf to snprintf calls.
Change-Id: I8893246fcd541d97b02a1a4cac81c53c6cd2e394
2014-04-24 16:20:50 -07:00
Colin Cross
f4b0b7971c Fix logging errors inside ALOGV
Fix errors exposed by adding checking to disabled ALOGVs.

Change-Id: I36b77bb0ad8dc7661b0f834f20d1179b86134d57
2014-02-07 13:26:04 -08:00
Christopher Ferris
df2906186b Re-enable libunwind for arm.
Update to handle the new optimized way that libunwind works.

In addition, a small refactor of the BacktraceMap code.

A few new tests of for good measure.

Change-Id: I2f9b4f5ad5a0dfe907b31febee76e4b9b94fb76f
2014-01-28 12:03:36 -08:00
Brian Carlstrom
db5911a08a Attempt to fix Mac build
Change-Id: I1364255bfed7788a35531962508bad804b8d5b7f
2014-01-18 13:55:54 -08:00
Christopher Ferris
46756821c4 Rewrite libbacktrace to be all C++.
This includes removing the map_info.c source and replacing it with the
BacktraceMap class to handle all map related code.

Change all callers of libbacktrace map functionality.

Also modify the corkscrew thread code so that it doesn't need to build
the map twice (once in the corkscrew format and once in the libbacktrace
format).

Change-Id: I32865a39f83a3dd6f958fc03c2759ba47d12382e
2014-01-16 16:12:29 -08:00