diff options
author | Yabin Cui <yabinc@google.com> | 2017-11-01 15:58:55 -0700 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2017-11-02 11:20:18 -0700 |
commit | 3d4aa26ae99db7576f352771d704bd9da9a55bcd (patch) | |
tree | 161cf9ed264aed0daa3d3a7217954d56db9078a9 /simpleperf/dso.cpp | |
parent | 29c0043b5334432afc01584f435585c2d2da49fe (diff) | |
download | extras-3d4aa26ae99db7576f352771d704bd9da9a55bcd.tar.gz |
simpleperf: fix callchains generated by the kernel.
The kernel stores return addrs in the callchain, but we
want the addrs of call instructions along the callchain.
So adjust callchains generated by the kernel.
Also avoid using const_cast<> in record.cpp by constructing
Record classes with non const buffers.
Bug: None.
Test: `python report_html.py --add_disassembly`.
Test: run simpleperf_unit_test.
Change-Id: I8c5f369e333ec9bc96cf5b5166ac670c3e3b5c62
Diffstat (limited to 'simpleperf/dso.cpp')
-rw-r--r-- | simpleperf/dso.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/simpleperf/dso.cpp b/simpleperf/dso.cpp index 90806406..7959d4b9 100644 --- a/simpleperf/dso.cpp +++ b/simpleperf/dso.cpp @@ -493,7 +493,7 @@ void Dso::FixupSymbolLength() { if (prev_symbol != nullptr && prev_symbol->len == 0) { prev_symbol->len = symbol.addr - prev_symbol->addr; } - prev_symbol = const_cast<Symbol*>(&symbol); + prev_symbol = &symbol; } if (prev_symbol != nullptr && prev_symbol->len == 0) { prev_symbol->len = std::numeric_limits<uint64_t>::max() - prev_symbol->addr; |