Commit graph

8 commits

Author SHA1 Message Date
Elliott Hughes
95c34a72af bionic supplies PR_SET_VMA now.
Bug: N/A
Test: builds
Change-Id: I8254711543cbf11bdf905ea441655ca1c1e82aac
2018-08-22 12:06:20 -07:00
Elliott Hughes
38488907a0 Move libbacktrace off cutils.
There's still <cutils/atomic.h> in a test, but I don't understand why
that isn't just std::atomic.

Also add a shared tgkill wrapper to libbase.

Bug: N/A
Test: ran tests
Change-Id: Idd4baa1e1670a84b3a8f35803cc5ffe5aae008a6
2018-07-11 13:55:07 -07:00
Christopher Ferris
88b48f7b18 Make sure at least XX maps are created.
Rather than expect exactly one set of maps, make sure there are at
least XX number of maps.

Test: Ran the 32 bit and 64 bit variants of the benchmarks.
Change-Id: I34184eab3810e92e7f246aa810ddb18fab443c9a
2017-12-08 12:48:46 -08:00
Christopher Ferris
086baf981d Switch libbacktrace new unwinder.
Update the backtrace leak tests to share a map since this is the most
common way it will be used, and it runs much faster.

Remove the CreateNew functions, and references to them.

Remove benchmarks of CreateNew functions.

Test: Builds, ran new unit tests, ran art tests.

Change-Id: I4a25a412f1a74c6d43aebbebbf32ead20ead8f94
2017-10-30 13:37:50 -07:00
Josh Gao
b9670bb437 libbacktrace: add benchmarks for Backtrace::Create, CreateNew.
Test: backtrace_benchmarks
Change-Id: I80ba5adb31d446314060edd00149f09e14e6815e
2017-10-26 14:20:16 -07:00
Josh Gao
3b094c169f libbacktrace: let the benchmark library decide iteration count.
Manually doing 1000 iterations of the benchmark doesn't seem to add any
significant amount of precision, and it makes the benchmark take
forever and obfuscates the results. Just let benchmark figure out the
time (with the option of using command line flags to increase the
number of iterations).

Test: backtrace_benchmarks64
Change-Id: I8de912c1b3c904755c8e2ac4175ff70176544ba3
2017-10-26 14:19:49 -07:00
Christopher Ferris
5169c167c5 Remove PauseTiming/ResumeTiming calls.
These calls can only be used after the call to state.KeepRunning(),
which handles the start/stop itself.

Bug: 68170209

Test: Ran the benchmark and got reasonable results.
Change-Id: Ie12eb3a983f6fe60c85d6dfc90957eedc16b5526
2017-10-24 12:39:10 -07:00
Christopher Ferris
60521c7d52 Speed up map creation.
- Rewrite the Maps::Parse to use open, and a buffer on the stack.
- Rewrite the line parser away from sscanf. The current way sscanf
  is used does not catch many malformed lines. In addition, this
  new version improves performance by 50% over sscanf on sailfish.
- Add a lot of unit tests for the parser to make sure there are
  no problems. In addition, add a special line that was not rejected
  with the previous version of the code.
- Add new accessor to get the map at a particular index.
- Add a backtrace benchmark for map creation for both new and old.

This cl results in ~5% speedup and makes the new unwinder map creation
about the same for 64 bit. It's still a bit slower, but not by much.
On 32 bit, we are still about 5% slower than the old creation method,
though.

Bug: 23762183

Test: libunwindstack unit tests pass. Ran the new benchmarks.
Change-Id: Id4431e539f400984e6fad62153fdf4152d518322
2017-08-23 15:43:39 -07:00