aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-07-06 23:10:48 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-07-06 23:10:48 +0000
commit57fb48f308717b9c2442e391ab569d94c441e708 (patch)
treee452a0715a179a89ff350983509d755af4920f8d
parent4b3de2b055b4482c1267a28fc803b999d42b3008 (diff)
parent938185d82b7df7e8f5d7473294bf00cf058b1009 (diff)
downloadperfetto-android13-d1-s3-release.tar.gz
Change-Id: Iab0d9bfb6b647ec9d68d0a9e219d34762a09e106
-rw-r--r--src/profiling/common/producer_support.cc21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/profiling/common/producer_support.cc b/src/profiling/common/producer_support.cc
index 544d3c5a2..8ab0b42a6 100644
--- a/src/profiling/common/producer_support.cc
+++ b/src/profiling/common/producer_support.cc
@@ -98,25 +98,18 @@ bool CanProfileAndroid(const DataSourceConfig& ds_config,
const std::string& packages_list_path) {
// These constants are replicated from libcutils android_filesystem_config.h,
// to allow for building and testing the profilers outside the android tree.
- constexpr auto kAidSystem = 1000; // AID_SYSTEM
- constexpr auto kAidUserOffset = 100000; // AID_USER_OFFSET
- constexpr auto kAidAppStart = 10000; // AID_APP_START
- constexpr auto kAidAppEnd = 19999; // AID_APP_END
- constexpr auto kAidSdkSandboxStart = 20000; // AID_SDK_SANDBOX_PROCESS_START
- constexpr auto kAidSdkSandboxEnd = 29999; // AID_SDK_SANDBOX_PROCESS_END
- constexpr auto kAidIsolatedStart = 90000; // AID_ISOLATED_START
- constexpr auto kAidIsolatedEnd = 99999; // AID_ISOLATED_END
+ constexpr auto kAidUserOffset = 100000; // AID_USER_OFFSET
+ constexpr auto kAidAppStart = 10000; // AID_APP_START
+ constexpr auto kAidAppEnd = 19999; // AID_APP_END
+ constexpr auto kAidSdkSandboxStart = 20000; // AID_SDK_SANDBOX_PROCESS_START
+ constexpr auto kAidSdkSandboxEnd = 29999; // AID_SDK_SANDBOX_PROCESS_END
+ constexpr auto kAidIsolatedStart = 90000; // AID_ISOLATED_START
+ constexpr auto kAidIsolatedEnd = 99999; // AID_ISOLATED_END
if (!build_type.empty() && build_type != "user") {
return true;
}
- // TODO(b/217368496): remove this.
- if (uid == kAidSystem) {
- return ds_config.session_initiator() ==
- DataSourceConfig::SESSION_INITIATOR_TRUSTED_SYSTEM;
- }
-
uint64_t uid_without_profile = uid % kAidUserOffset;
uint64_t uid_for_lookup = 0;
if (uid_without_profile >= kAidAppStart &&