Reuse transaction-name cache across instances of the same interface.
Currently every binder object stores its own mapping of transaction codes to names. This is OK for services but may be wasteful for things like callback classes for which we can have many instances. Also change the default getMaxTransactionId to be -1, as 0 is the value for an interface with one method. There may be up to 50 interfaces in system_server for which we incorrectly assume that they are user defined and allocate 1024 entries (wasting hundreds of KB). Bug: 330738126 Test: AidlTest Flag: android.os.binder_cache_transaction_trace_names Change-Id: I2b960c2a9f0f325e6d99bb0d15999997dbea81e2
Loading
Please register or sign in to comment