Age | Commit message (Collapse) | Author |
|
Useful for projects that include it but need to be buildable on host.
Test: compiles
Bug: 305648381
Change-Id: If742cd84ab20cc02331743d65b6fa03b504fb067
|
|
Test: manually collect a trace
Bug: 293435349
Change-Id: Iccc7ab4592bde9d8f272ea63f45be86209fb774e
|
|
Better string handling, avoiding work where possible, new filter mode to
optimize the case when the subscriber is the only layer.
Bug: 293435349
Test: atest
Test: benchmark
Test: manually ran the sample and captured a trace
Change-Id: I05ede25daaadb109cffae2ad7658d4fab58b4b5d
|
|
The difference is within normal noise levels but it's a bit neater.
Bug: 293435349
Test: run benchmark
Change-Id: If46ceaa00a0c57942553e4710a2e8fbc366edefb
|
|
Measure the times so that we can optimize them.
Bug: 293435349
Test: Run benchmarks on aosp_cf_x86_64_phone
Change-Id: I2f5c23254533a92d122fab35f18bdbf4cafb19b2
|
|
A simple subscriber that forwards calls to ATrace. It is not optimized,
the purpose of this implementation is to have a working starting point
to test and benchmark.
Tests follow the same pattern as the main libatrace_rust but we had to
copy the global mock helpers because the mocked methods are different.
Bug: 293435349
Test: atest
Test: manually uploaded and captured a trace
Change-Id: Ibce802ec28159366d5d58550b105e9cd9546fded
|
|
These will soon be required by a lint.
Bug: 290018030
Test: m rust
Change-Id: I4a2c338909c8f25e3727edc9a8ce61ae1a7e7ea3
|
|
Finishing touches before the library is more or less ready to use.
Bug: 289989828
Test: atrace
Test: Manually collected trace
Change-Id: I0186bbff1417fefde8056a9e8e39055988d1875a
|
|
Bug: 289989828
Test: atest
Test: Manually collected trace
Change-Id: I821cd5a2cb4f19c7519085dd74f359095a1cb052
|
|
Scoped events are more convenient and less error-prone than beginning
and ending events manually.
Bug: 289989828
Test: atest
Test: Manually collected trace
Change-Id: I9078e326c7868af30f1a2b60eedcdb82778dc653
|
|
These are the last remaining methods from ATrace to add.
Bug: 289989828
Test: atest
Test: Manually collected trace
Change-Id: I95a1494a0109c84ef20fccc5c565332f5698c912
|
|
Bug: 289989828
Test: atest
Test: Manually collected trace
Change-Id: I69e609d45c67a9a7e07e98f282339a1759577751
|
|
Bug: 289989828
Test: atest
Test: Manually collected trace
Change-Id: Ie893ae8c3c82a3020a752e4a2fbfeac0dd018e87
|
|
Gating the binding call on tag status lets us avoid constructing CString
and spending a lot of time when tracing is disabled.
We'll use this optimization when adding other wrapper methods that
accept strings.
Change of atrace_begin time with tracing off: 100 ns -> 6 ns
Test: atest
Test: Manually run libatrace_rust_benchmark
Test: Manually run libatrace_rust_example and collect a trace with
Perfetto.
Bug: 289989828
Change-Id: Id73cdfa887da9b5d2142154d3be5f88872108675
|
|
Will be used for Rust bindings.
Test: Manually run libatrace_rust_example and collect a trace with
Perfetto.
Bug: 289989828
Change-Id: I08951eec445b91a4e451164957a5e6bd2f00bb6c
|
|
The benchmark gives us data on relative performance of API wrappers vs
calling the API directly.
Right now it shows big overhead on atrace_begin with tracing disabled.
This is expected - we always allocate a CString which is ignored if
tracing is off. The perf issue will be fixed in the next commit.
Bug: 289989828
Test: Run benchmarks on aosp_cf_x86_64_phone
Change-Id: I25868b7724f70ac875ec1e8cbfb192e16cc7087c
|
|
The new library is a wrapper over bindings to cutils.
This commit establishes the basic structure of the library. To make the
review smaller we only wrap two functions for now - atrace_begin and
atrace_end. These functions are not optimized yet and instead use the
simplest possible implementaiton.
Future commits will improve the performance and add the rest of the API.
Bug: 289989828
Test: atest
Test: Manually run libatrace_rust_example and collect a trace with
Perfetto.
Change-Id: I323fe300aeeab9343a5d25f993cd989be0059d80
|