We are now default restricting bindgen visibility to subpackages. This
change is part of a set of changes adding explicit visibility for
bindgen libraries which are already being used elsewhere.
* If these visibility rules are to allow access by the safe bindings
library which lives elsewhere in the codebase, no action is needed.
* If safe bindings do not exist, and you own this library, now is a good
time to think about producing them and transitioning your (now
enumerated) client list.
* If safe bindings exist, but there is a surprise client of the raw
bindings on this list, now is a good time to talk to them about why
they don't want to use your safe bindings.
Bug: 166332519
Test: m
Change-Id: I1320a72d61cf0d760da3e037dec6ad35c8c979f8
The library is required to log the atoms from virt apex. See bug for more details
Test: m succeeded. The whole topic is tested with statsd_testdrive 409
as mentioned in go/westworld-create-atom#step-3-test-your-atom
Change-Id: If8b13c9d1878265bfcb8e09fc1bd8e78e968f71f
Manages binder lifecycle & provides interfaces for the underlying IPCs.
Callers can use StatsBootstrapAtomClient::reportBootstrapAtom. Under the
hood, we use checkService, which will not wait for the service. This is
so we avoid blocking the client. If StatsBootstrapAtomService is not
available, the log will be dropped, and false will be returned.
Test: manually verified atoms could be logged to statsd
Bug: 206644307
Change-Id: I63ae62f1ce4d1dc337f99c9e3b35b2496131c582
Note that this is currently a no-op test that does nothing. But this
makes it future proof in case we add more later.
Test: atest
Change-Id: I23817febd2122f54c40958541fc66363d38b60ca
Added SPDX-license-identifier-Apache-2.0 to:
libstats/pull_rust/Android.bp
Bug: 68860345
Bug: 151177513
Bug: 151953481
Test: m all
Exempt-From-Owner-Approval: janitorial work
Change-Id: I362f72ab99850558ddc7b50108c1ec6a212cb258
Added SPDX-license-identifier-Apache-2.0 to:
libstats/pull_lazy/Android.bp
libstats/socket_lazy/Android.bp
trusty/utils/acvp/Android.bp
Bug: 68860345
Bug: 151177513
Bug: 151953481
Test: m all
Exempt-From-Owner-Approval: janitorial work
Change-Id: I33005150521238b61d1a8c923749b17d36bba693
Add lazy loading support to libstatspull.
There are a few clients (surfaceflinger, bootanimation dependencies)
that run before the statsd apex is mounted and cannot link
libstatspull.so when the process starts. Lazy loading will load the
library when the apis to set/clear callbacks or create PullAtomMetadata
get called.
This change is modeled heavily off of aosp/1570701, which added
libnativehelper_lazy.
Bug: 178480419
Test: atest libstatspull_lazy_test
Change-Id: I9956f5a690aec8c7ff9f0834a3f36387e5d8b23f
Add lazy loading support to libstatssocket.
There are many clients of libstatssocket (lmkd, surfaceflinger,
bootanimation dependencies) that run before the statsd apex is mounted
and cannot link libstatssocket.so when the process starts. Lazy loading
will load the library when the logging apis get called.
This change is modeled heavily off of aosp/1570701, which added
libnativehelper_lazy.
Bug: 178480419
Test: atest libstatssocket_lazy_test
Change-Id: I57e6f698ad43dddc98dc787ba2fe888030c8a282
The //frameworks/base/apex/statsd path is being migrated to
//packages/modules/StatsD/apex.
BUG: 167962588
TEST: TH
Change-Id: Ifa64bd8268f1515597b11376cdf08828983e0c60
android_filesystem_config.h is found since system/core/include is on
the include path for all projects and contains a symlink to the real
android_filesystem_config.h. This is fragile and the below bug seeks
to remove this symlink and have users correctly depend on
libcutils_headers.
Bug: 165825252
Test: build
Change-Id: I1aad6a2e8fbe87635e97b0ac1be3414403353382
Pushed atoms do not need to be truncated because only the bytes added to
the buffer are written to the socket. Pulled atoms do not need to be
truncated because within stats_pull_atom_callback.cpp, we only copy the
valid parts of the buffer to the StatsEventParcel object.
This improves performance by avoiding a needless call to realloc.
+ removed dead benchmarking code
Test: m libstatssocket
Test: atest libstatssocket_test
Test: atest GtsStatsdHostTestCases
Bug: 158717786
Change-Id: I6965f8832758203ca566336ba12d0acaf5f756d5
Increase AStatsEvent max byte size to 50 KB for pulled events.
All AStatsEvent instances are treated as pulled events unless
AStatsEvent_write() is called.
- Set the default max size to 50 KB
- The starting buffer size is still ~4 KB for pushed and pulled events.
- If a write would exceed the buffer bounds, double buffer size until
write fits or 50 KB limit is exceeded in which case the overflow bit is
set to true.
- If AStatsEvent_write() is called, max size is set to ~4 KB. And if
the current payload exceeds this limit, set overflow bit to true.
- Fix error mask checking in stats_event_test.
- Set ERROR_NO_ATOM_ID when atom id is missing.
- Make sure tests don't hit ERROR_TOO_MANY_FIELDS when testing buffer
overflow.
- Rename event->size to event->numBytesWritten
Fixes: 158214941
Test: libstatssocket_test
Change-Id: Ia26aeb775f7e4f2ffe87707bab6d0119e21da10e
If the first call for pullFinished fails, it is likely because the
transaction is too large. Currently, if this happens statsd will just
sleep until the timeout. With this change, the client will retry calling
pullFinish if the first attempt fails, but with an empty payload (and
with success = false) to cause the puller to fail fast, and so statsd
does not wait for the timeout.
Test: atest LibStatsPullTests
Bug: 157768117
Change-Id: I3af991fae47bb7c09bf8a6fc83f28556b836c6e4
and apply mainline module test controller to it so that
the tests will only be run when statsd apex is found on device.
Bug: 154845935
Test: m mts && mts-tradefed run mts-statsd
Change-Id: I8939e68b4d4c3772e248c1960b74c0f1bd6a21a6
statsd should now be enabled on all devices and this check is
unnnecessarily adding a check for each time there's a call into the
socket, which is inefficient.
Bug: 157082130
Test: make, statsd_test
Change-Id: I0bb0ae0c93516c3a02cb971742c3eba602668a09
Modules contributing mainline modules (APK/APEX) should set
min_sdk_version as well as apex_available.
For now setting min_sdk_version doesn't change build outputs.
But build-time checks will be added soon.
Bug: 152655956
Test: m
Merged-In: Icd184c6fe06a688bd79ef6514bb49dffb706a9a1
Change-Id: Icd184c6fe06a688bd79ef6514bb49dffb706a9a1
(cherry picked from commit cc3588afcb)
create both 32 and 64 bit variants
fixes libstatssocket_test for 32 bit devices
Bug: 154652564
Test: make mts, adb push, adb shell all 4 tests
Change-Id: Ia6b51686c06e786b38cb3713315977533f1bb819
The marked library(ies) were available to the APEXes via the
hand-written whitelist in build/soong/apex/apex.go. Trying to remove the
whitelist by adding apex_available property to the Android.bp of the
libraries.
Exempt-From-Owner-Approval: cherry-pick from AOSP
Bug: 150999716
Test: m
Merged-In: I8fd2a3c9b69454c6018c72f5198898bc90dc4d0d
(cherry picked from commit 937b4bf173)
Change-Id: I8fd2a3c9b69454c6018c72f5198898bc90dc4d0d
Test: bit statsd_test:*
Test: bit libstatssocket_test:*
Test: bit libstatspull_test:*
Bug: 153349659
Change-Id: Ief3d0e062ed3e5cabf5b8b6198510caf3f64eefd
Originally, the native implementation would discard everything clients
wrote to the buffer before the setAtomId call. Thus, the atom id was
always placed in the "correct position." However, for consistency with
the Java implementation, we now allow write calls before setAtomId to
occur and log an error in that case.
Test: bit libstatssocket_test:*
Bug: 152119205
Change-Id: Ib109c7a939a5ae92c1d5fc70aa647ac7390fadad
The ABI dump for libstatspull can't be built due to the link error.
Test: development/vndk/tools/header-checker/utils/create_reference_dumps.py
Bug: 151102177
Bug: 151694054
Change-Id: Id324890235679b9593995b6e12a60ef055b4c825