History log of /system/core/libunwindstack/include/unwindstack/Memory.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f4e3ff6619f34c1b9f1f71fb4050e6bea9f65ead 04-Apr-2018 Christopher Ferris <cferris@google.com> Add a MemoryOfflineBuffer object.

Use this for offline stack data so that it's not necessary to
copy any data around.

Add unit tests for the new object.

Bug: 77258731
Bug: 74354410

Test: Ran libunwindstack/libbacktrace unit tests.
Change-Id: I9b0f25d9520c96e64aedef5f295423c60ddb3488
(cherry picked from commit 6633b0ca090dd3da45b8936d587a1316401e46ba)
/system/core/libunwindstack/include/unwindstack/Memory.h
150db124f3f3c0f8e1c341fd33c6c64310e0ac39 21-Dec-2017 Christopher Ferris <cferris@google.com> Add ability to read jit gdb data.

Changes:
- New JitDebug class to handle all of the jit gdb interface.
- Add unit tests for all, along with new offline test using debug data.
- Add new Memory type called MemoryOfflineParts that has multiple
MemoryOffline objects to support the offline test.
- Update the tools to use the JitDebug object.
- Modify libbacktrace to use the JitDebug, but only looking in libart.so
and libartd.so.
- Change the Format32Bits to Is32Bit since it's more accurate and I use
it in a different context where original name didn't make sense.
- Add a new function to find global variables in an elf file
(GetGlobalVariable).
- Add a new function to determine if a pc is valid for this elf (IsValidPc).

Bug: 68396769

Test: Ran new unit tests. Added new offline test that uses jit debug data.
Test: Ran art test that generates jit data and verified a crash unwinds
Test: through the jit data.
Change-Id: I6e7ee2f5bab2242028a06feece156dff21c0a974
/system/core/libunwindstack/include/unwindstack/Memory.h
e328673a305a5c9f4acf73a7a2826eb61390632c 08-Dec-2017 Christopher Ferris <cferris@google.com> Add method to detect remote read function to use.

The process_vm_read function is much faster than ptrace, but sometimes
that will not work on a remote process. Modify the libunwindstack
MemoryRemote object to figure out which one it can use.

Wrote new unit test to verify this checking behavior.

Modify libbacktrace so that the read from libunwind is used instead of
using the default ptrace calls.

Add some benchmarks to libbacktrace to compare the two different methods.

Test: Ran unit tests libbacktrace/libunwindstack/debuggerd.
Test: Ran debuggerd -b <SYSTEM_SERVER_PID>
Test: Ran debuggerd -b <MEDIACODEC PID>
Test: Ran debuggerd -b <RANDOM_PID>
Test: Used crasher to create tombstones and verified stack data is
Test: dumped properly.
Change-Id: If75ca238289532dd8e1de430d569cabb2523380a
/system/core/libunwindstack/include/unwindstack/Memory.h
b837763b494e59f8532e98d2b57a5f28ed15c5a7 18-Oct-2017 Josh Gao <jmgao@google.com> unwindstack: rename Memory::ReadPartially to Read.

Test: mma
Test: treehugger
Change-Id: I53c2c5600fb44620b629c01db85a67789594595f
/system/core/libunwindstack/include/unwindstack/Memory.h
ef35aa5d40b6404baf702a58527f1cd3a9f42f19 18-Oct-2017 Josh Gao <jmgao@google.com> unwindstack: rename Memory::Read to ReadFully.

Rename Memory::Read to ReadFully to match its semantics with that of
android::base. ReadPartially will be renamed to Read in a follow up
commit, kept intentionally separate so that there aren't any callers
accidentally switched from ReadFully to Read.

Test: treehugger
Change-Id: I7d845ac5244c3025d92c8512e960e5d0d1da05af
/system/core/libunwindstack/include/unwindstack/Memory.h
29c5378e91720b7befabc91fbab0f25d59a23bf1 26-Sep-2017 Josh Gao <jmgao@google.com> unwindstack: add Memory::ReadPartially.

Add a way to read while allowing for partial reads.

Test: new tests added to libunwindstack_test, ran 32/64 on hikey960, sailfish
Test: ran unwind on hikey960/sailfish
Change-Id: I8b11d9230fcd3122148ef3f980863ac1404ad70a
/system/core/libunwindstack/include/unwindstack/Memory.h
5f118519fd323a0c71b54de9279e8a9ea6a56271 01-Sep-2017 Christopher Ferris <cferris@google.com> Add a method to share the process memory object.

New function to create the process memory object. This allows for
a future where different remote process memory objects could be created
depending on the way remote memory can be created. Even different local
memory objects that access memory without doing any checks.

It also allows MemoryRange objects to share one single process memory object
and could help if the process memory object caches data.

Small changes to MapInfo::CreateMemory to when some errors are detected.
- Always check if the map is a device map, instead of only if the name
is not empty.
- Check if a memory map is readable before creating the memory from process
memory.

Bug: 23762183

Test: Ran unit tests, unwound on device using the new code.
Change-Id: I12a93c2dc19639689a528ec41c67bfac74d431b3
/system/core/libunwindstack/include/unwindstack/Memory.h
d226a5140989f509a0ed3e2723f05d5fc93ce8df 14-Jul-2017 Christopher Ferris <cferris@google.com> Make the library usable as a library.

- Add namespace unwindstack everywhere so that it's easier for other
code to use the library.
- Move some of the header files into include/unwindstack so that they
can be exposed.
- Modify the headers so that only a limited number need to be exposed.
- Update the tools to use the new headers.
- Add a GetLoadBias() call on the Elf object. This prevents the need
to get the interface object out of the Elf object.
- Move the GetRelPc() call out of the Reg class, to the Elf class. It's
not always the case that a Reg object will be around when you want to
get a relative pc. The tests for this moved to ElfTest.cpp.

Bug: 23762183

Test: Unit tests pass.
Change-Id: Iac609dac1dd90ed83d1a1e24ff2579c96c023bc3
/system/core/libunwindstack/include/unwindstack/Memory.h