Commit graph

11 commits

Author SHA1 Message Date
Jeffrey Huang
b0a85dc46d Add apex_available to libs
Bug: 145922701
Test: m -j
Change-Id: If5cbe5651e47878520bdc5b943b17a4f72a2a2f3
2020-02-12 18:30:26 -08:00
Ruchir Rastogi
223dadb830 Migrate libstatspull to libbinder_ndk
Since libstatspull will be placed within the APEX, we need to move to
libbinder_ndk.

Test: m -j libstatspull
Test: atest LibStatsPullTests
Bug: 145213327
Change-Id: I86dd6e759efa5eb20bffc76492d5fa72cf279872
2020-02-10 16:07:18 -08:00
Jeffrey Huang
8095e4eef1 Update libstatspull lib
statsd_aidl was updated, so this is the matching change.

Test: m -j
Bug: 148682447
Change-Id: Iec0459cec9f649eb23c6d04b205075fff9b6e911
2020-02-07 12:17:40 -08:00
Tej Singh
a8fd39d83f Expose libstatspull as a stable C API
Libstatspull will ship as a part of the statsd apex in R.

Also update libstatssocket to have version 30 to align with api level,
as per native api council feedback.

Change both libraries to use NDK style naming conventions (AStatsEvent,
AStatsManager), and remove unneeded APIs in libstatssocket.

Remove KeyValuePairs from libstatssocket. KeyValuePairs will not be
supported in native code.

Bug: 147499386
Test: make libstatspull
Test: make libstatssocket
Test: atest libstatssocket_test
Change-Id: Ie79771461215a057529aaac91db95e4334c3960e
2020-02-04 14:07:35 -08:00
Tej Singh
518d77d208 Register pullers in separate thread
This cl modifies getStatsService to use the blocking getService, but
also makes the binder call in a separate thread to not block the client
thread. This is needed because it is possible for pullers to be
registered before statsd starts, and calling checkService before statsd
is up will fail. We also would never receive the binderDied to register
it, because we would never have a binder object to linkToDeath on.

Bug: 147682855
Test: atest LibStatsPullTests
Change-Id: I68c04bc24c7fe066eca88cab4f6a76885581c1ee
2020-01-15 21:15:26 +00:00
Tej Singh
dab324f6e0 Unregistration of native pullers
Changes the API to return an int instead of a bool.
Creates API to unregister pullers.

Test: atest LibStatsPullTests
Bug: 144373250
Change-Id: I6d395237082337a22f37190343a1fc59703d39bf
2020-01-14 14:37:58 -08:00
Tej Singh
7e1b190832 Remove extra indirection in native puller API
The indirection is unneeded since we already take a function pointer.

Test: builds
Change-Id: Ice426d7dcb090aaf87a377ede233a4eb18f5eb30
2020-01-09 11:53:53 -08:00
Stan Iliev
5dc56738bf Change register_stats_pull_atom_callback cookie parameter to non-const
Test: Ran GRAPHICS_STATS puller
Bug: 146052586
Bug: 142665516
Change-Id: I98b4cbb99e35eda50fa9dc3069b3f0ddf16f5ff9
2019-12-16 12:14:08 -05:00
Jeffrey Huang
666510a0d4 Rename IStatsManager to IStatsd
Bug: 146075178
Test: CTS/GTS tests
Change-Id: I08f1b5c6f67c9e510dfaa7b50737c2720e177ad9
2019-12-12 11:32:41 -08:00
Ruchir Rastogi
9ecc986bb7 Use StatEventParcel in libstatspull
Test: m -j128 libstatspull
Change-Id: Ice031f38cdde8a505a887359f6c0cb3312046929
2019-12-06 13:57:42 -08:00
Tej Singh
c03d009697 Native puller API: libstatspulled
Create a new library for the native puller callback API. The library has
2 main interfaces: register_stats_pull_atom_callback, which is used to
register a callback, and stats_pull_atom_callback_t, which is the
callback for the puller. It also exposes pulled_stats_event_list, which
is a struct wrapper around a vector of stats_event.

Test: make libstatspull
Bug: 142969725

Change-Id: I14fe4dc523d6f81fdeaa3fe6fad3e95aeecfe92e
2019-12-04 15:56:21 -08:00